Engineering

Shipping SEO at build time: the prestruct migration

How we replaced a homebrew prerender with our open-source prestruct engine, swept the dead code, and put the whole SEO head contract under CI.

The problem with homebrew

This site used to ship its SEO through two in-repo scripts - a prerenderer and a brand injector - plus a client-side SEOHead component. It worked, but it was ours alone: no validator, no upstream fixes, no tests, and every SEO improvement had to be hand-rolled twice. When the engine graduated to a published package (prestruct 1.1.0), the right upgrade was deletion, not merging.

The sweep

We deleted the scripts, the client head injector, and a speculative security utility that had zero imports. We trimmed the home description from 202 characters to 153, pointed the projects page title at real keywords, and aligned the config with the engine contract - one source of truth, validated on every build.

What the audit caught

Then we wrote an audit that walks the baked output and refuses to pass on missing tags. Its first run caught two real bugs: the og:image was an SVG - invisible to Facebook, X, and LinkedIn scrapers, so every share preview was blank - and a 404-page generator bug that destroys four head tags with literal $1/$2 replacement garbage. The SVG is now a verified 1200x630 PNG, and the bug is filed upstream.

The payoff

The head contract is now enforced by CI: every commit and pull request builds with strict prerendering, audits every baked page, and fails loudly on regressions. LocalBusiness schema is complete - phone, hours, price range, geo, sameAs - and the FAQ schema rides on the homepage. Technical SEO is no longer a chore; it is a property the build guarantees.

Build with people who write this down.

Methodical, transparent, and documented - on our site and yours.

Start a Project