My personal site
Built with a small static site generator that lives in this repo. React and MDX render every route to HTML at build time; the browser gets that HTML, one inlined stylesheet, and a ~2 KB runtime that hydrates the few interactive parts as Preact islands. No framework, no server, no runtime data fetching.
Getting started
- Install the
pnpmpackage manager: https://pnpm.io/ - Run
pnpm installin the project directory - Run
pnpm devto start a local development server on http://localhost:3000
Environment variables
None. The build reads no secrets and makes no network requests. PORT
overrides the dev server's default of 3000.
Usage
pnpm:
dev: watch, rebuild and serve locally with live reload
- build: the production build, under Node — this is what Vercel runs
- build:bun: the same build under Bun, faster locally, identical output
- check: typecheck with tsc --noEmit
- lint: lint with oxlint and format with oxfmt
- test: the platform check (feeds, OG images, font subsets, vercel.json)
- gate: build, then diff the output against the committed snapshot
- snapshot: rewrite that snapshot, when you mean to change the output
Directory structure
build.ts: the whole buildframework/shared/: types, URL routing rules, view-transition namesframework/content/: posts, notes, projects, committed tweets and image sizesframework/render/: the route registry, the HTML shell, MDX, highlighting, islandsframework/assets/: the Tailwind sheet, the client bundles, the font subsetsframework/platform/: OG images, feeds, sitemap, Vercel configframework/client/: the runtime and the same-document routerapp/pages/: page components;app/islands/: the interactive onesapp/components/,app/mdx/,app/styles/: shared components, the MDX component maps, and global stylesposts/,notes/: MDX content rendered at build timepublic/: favicons, blog images, and the KnightOS emulator, copied verbatimtools/snapshot.ts: the regression gatedocs/:ARCHITECTURE.md, and the snapshot the gate compares against
.vercel/output/.
License
MIT