Skip to content
← Work log

Wiring it into the pages, and the article template

Once every component was in, the site could finally start using them. The first thing to go in was the page frame. Every page now sits inside a PageShell, which holds the skip link and the one <main>, and every block on a page is a Section that sets its own width on a shared container scale. Routes stopped rendering their own <main>, which also fixed a 404 page that had ended up with two. /log was rebuilt on Sections first, so it could act as the proof before anything else moved over.

Then the chrome and the content. The site header, footer and theme toggle came over from the design system, and the post lists, the apps, open source and resume pages, and the photo grids were wired to their components. Posts now render through the system's Prose and CodeBlock, which means Shiki is gone. Code fences look the way the design system wants them to look, and the old notes about Shiki got deleted from the docs rather than left to contradict the code. A small side effect: the reading measure was a touch too narrow for Prose's 16px text, so it went from 36rem to 42rem.

The article template was the biggest piece. It takes a post and splits it at its ## headings into template sections, so each heading becomes a band and anything before the first heading becomes an introduction. The split ignores ## lines inside code fences, so a shell comment that happens to start with a hash doesn't cut a post in half. The container breakpoints were snapped to the site's scale at 45rem and 66rem, so they line up with the sections around them. The subscribe bar is hidden until there is a subscription backend to point it at.

The design system had been rebuilt again overnight, so I synced the snapshot from the artifact. That brought in GrainType, the article template and its five parts, and some tooling. It also missed a file. usePageTheme.jsx didn't come across, and the inverse bands depend on it, so the article template had nothing to read its colours from. A follow-up commit put it back the same day.

GrainType ported with a parity fixture, and the article template got its inverse tone and the parts. The parity check says GrainType and Prose match the design system exactly, and two older mismatches (the depth-of-field effect in light mode and the lightbox focus in dark mode) were already there before this work. The grid screen in light mode is intermittently off by 1/255 on a few pixels, which I'm leaving alone until it's worth chasing.

rebuild
AI-OMETER— DISCLOSURE INDEX
MACHINE-LED80%