Step 6: Special templates
Some templates are fixed designs rather than content: a block theme's 404 page is the typical case. They are quick to reproduce and often the weakest page.
Method (Twenty Twenty-Five's 404)
- Capture
<main>of a native 404 page: a two-column layout with the theme's photo on the left and the heading, message and search form bottom-aligned on the right. - Reproduce it in
src/platforms/wp/twentytwentyfive/error404/index.ts, withownMain: true, keeping the payload's title, message and home URL (escaped). - Link theme assets site-relative. The photo is part of the theme (
/wp-content/themes/twentytwentyfive/assets/images/404-image.webp). Flx pages are served on the site's own domain, so a site-relative link works with no payload change. - Copy the missing per-page layout rules (two for this template) into
src/styles/tailwind.css, classes doubled, as in step 4. - Keep the real status. The plugin sends a rendered 404 with HTTP 404, so search engines see the right status.
- Update tests that pinned the old markup to check the same guarantees on the new one: a labelled, required search field named
s, the native placeholder text, and the theme's search block classes.
Check: 404 fidelity. On Twenty Twenty-Five it went from 41% to 89% / 82%, taking the averages to 80.9% / 77.4%.
When to stop
After the template parts, lists and fixed templates, what remains is block-by-block styling inside post content: galleries, cover images, wide and full alignment. Each block is a smaller gain for more work. Twenty Twenty-Five shipped at 80.9% / 77.4%, with media (37% on a phone) and layout blocks listed as known gaps.
Published from rickey29/twenty-twenty-five at commit 2541c1d · Flx Modernize 1.0.0 · Flx Render 1.0.0