3 min readRewritten 10 times

I rewrote this site from scratch. It still isn’t finished.

How replacing a 1,100-dependency Next.js portfolio with a custom static site generator — first in Rust, now in zero-framework TypeScript under nge/ — cut builds under a second and enabled CriticMarkup.

One typo fix took forty-five minutes of dependency updates. That was the afternoon I decided to throw away my old site stack.

This portfolio used to be a Next.js app. It worked fine, until I came back three months later to change two sentences and had to wade through 1,100 transitive npm packages just to build six projects and four essays.

So I designed a custom static site generator from scratch — first as a zero-dependency Rust binary, and later ported straight into a lean TypeScript generator under nge/ (nge/build.ts) so it deploys effortlessly anywhere Node runs with a single runtime dependency (express) and no framework boilerplatezero front-end frameworks.

Studio overhead layout of cream index cards connected by cobalt-blue pencil pipeline arrows beside a steel ruler
Markdown and TOML in on the left, clean static HTML out on the right — zero third-party middleware.

What the generator actually does#

It reads site.toml and every Markdown file in content/, renders both English (/) and French (/fr/) trees, generates interactive SVG device demos and per-page 1200 × 630 PNG Open Graph cards, injects exact image dimensions to eliminate layout shift, and writes plain static files to public/.

// nge/build.ts, trimmed down
const contents = loadAll(opts);
for (const c of contents) {
  pages.push(render.home(ctx), render.projectsIndex(ctx), render.blogIndex(ctx));
  for (let i = 0; i < c.projects.length; i++) pages.push(render.projectPage(ctx, i));
  for (let i = 0; i < c.posts.length; i++) pages.push(render.postPage(ctx, i));
}
for (const page of pages) {
  writeFile(path.join(out, page.path), render.rewriteUrls(addSizes(page.html, out), page.path, mode));
}

The numbers: a full bilingual build of all pages, RSS feeds, sitemaps, llms.txt, search indexes, and generated SVG/PNG assets finishes in well under a second on a laptop — no bundler, no React hydration payload, no framework churn.

Four components I wrote by hand, on purpose#

ComponentModuleWhy build instead of importing a framework
TOML parsernge/toml.tsSupports the exact schema site.toml and front matter need, with clear error messages
Markdown enginenge/markdown.tsNative CriticMarkup tracked changes, semantic figure captions, and strict URL sanitization
Syntax highlighternge/highlight.tsTwelve languages cover every snippet in this journal with zero client JS
Live-reload & static serverserver.tsCompressed static serving, security headers, and instant localhost previews

Writing your own Markdown parser isn’t a sensible way to spend a weekend. It is a surprisingly good way to own every single byte your site ships to visitors.

Essays that show their own edits#

Because the Markdown engine is custom, the journal natively supports CriticMarkup. That lets me leave the history of a sentence visible on the page: this essay has been rewritten six timesrewritten ten times, and some paragraphs are still on probationThis one, mostly..

It’s a small typographic detail, and also the most accurate summary of how I build software: nothing is ever truly finished — it’s just the cleanest version shipped so far.

What’s already done — and what’s next#

  • Instant live reload and in-memory Brotli/Gzip caching in server.ts
  • Generated interactive SVG screens and per-page 1200 × 630 PNG link previews
  • Zero-backend client-side command-palette search (Cmd+K)
  • Machine-readable llms.txt, llms-full.txt, and Schema.org structured data for search and AI engines
  • Build-time responsive image resizing (srcset) so I stop exporting multiple widths manually

This site will never be finished. That’s the point. It just needs to get noticeably faster and sharper every time I touch it.

The first Rust prototype proved the architecture; today’s custom TypeScript generator in nge/ carries the exact same philosophy — zero bloat, strict semantic HTML, instant first paint — directly into the client web apps I ship.

Last edited on .

Found something in here that isn’t good enough? Tell me and I’ll fix it.

Follow Mr Never Good Enough

Moreau Christopher on every network.