Skip to content
← Work log

The stripdown

The plan is a brand-new site built on a design system I'm working on separately. The old Next.js version had grown a lot of personality over the past year (a topographic background that reacts to the mouse, autumn leaves, noise overlays, phone mockups that tilt) and all of it was wired directly into the pages with something like 200 inline style blocks. Reskinning that would have meant fighting it at every turn, so we're rebuilding instead, on TanStack Start, on a long-lived branch that won't see production until the whole thing is done.

The first step was deliberately boring. Strip everything back to plain semantic HTML with no CSS at all — browser defaults, Times New Roman, blue links — but make sure every URL that exists today still renders its real content, and that nothing a search engine cares about gets lost. Titles, descriptions, canonicals, the OpenGraph and Twitter tags, the JSON-LD, the sitemap, RSS, robots.txt, the llms.txt files. The design comes later. Losing a couple of years of SEO in a rebuild is the kind of mistake you only notice months after, so it had to be provable rather than eyeballed.

To prove it, Claude wrote a script that pulls every URL from the live sitemap, fetches each page from production and from the new build, extracts every head tag and JSON-LD block and diffs them. It also byte-compares the sitemap, feed and llms files. That turned up a few things I didn't know about the old site — on /writing, /photography and the FrictionList pages Next had been quietly falling back to the site-wide social tags, so a shared link to the photography page showed the homepage title and description. The new version gets those right, which is a nice side effect of rebuilding from scratch.

The work itself was split the way I've been doing most things lately. Claude did the risky bits first on its own — getting the MDX posts bundled into the server build, compiling them with syntax highlighting, the root head tags, one real post rendering, and a Vercel preview to prove it actually ran there. Once that held up, four Sonnet agents took a section each in their own git worktrees (home and writing, apps and resume, open source and photography, and the sitemap/feed/OG image routes) and Claude merged their branches by hand afterwards. The only conflicts were in the generated route tree, which just gets regenerated.

A few things bit us along the way:

  • TanStack's head management de-dupes meta tags by name, which is sensible until you need two theme-color tags (light and dark) or an article:tag per keyword. Those get rendered directly in the component instead and React 19 hoists them into the head.
  • Shiki's default regex engine is WebAssembly and it wouldn't bundle into the server function, so code highlighting uses its JavaScript engine instead.
  • The custom Shiki theme sitting in the old codebase turned out to be dead code — production was actually using the built-in houston theme. We'd carried the dead one over and every code block was rendering in a single colour until a check comparing colour palettes against production caught it.
  • The native image renderer for OG images crashed the dev server, because Vite's dependency pre-bundler tried to bundle a .node binary.

That last one kicked off a bit of a dependency diet. Shiki was bundling every language grammar it has when the posts only use nine, the RSS library was replaced with about fifty lines of template, and the generated per-post OG images got swapped for a single static card until the design system gives them a proper look. The server bundle went from 21MB to 4.3MB, with no native binaries left in it.

The photography page lost its image library along with Next, so the photo dimensions and colour sort now come from a manifest generated by a small script using macOS's built-in sips. The hue sort comes out slightly differently to the old one, which nobody but me will ever notice.

To wrap up, we reorganised the code by feature instead of the usual lib/ and types/ grab-bags, deleted an abstraction that assumed photography would have MDX posts (it never did), and tidied about 45 stale git branches — archiving anything that only existed locally as tags first. There was one wobble where a careless command stashed the uncommitted restructure mid-verification, but it popped straight back. Worth mentioning only because it's a good reminder to read the commands before they run.

The whole site is currently black text on a white page, and it's surprisingly pleasant to read. Next up is bringing in the design system.

rebuild
AI-OMETER— DISCLOSURE INDEX
MACHINE-LED80%