React Router can generate plain HTML files at build time, so a blog like this needs no server. In framework mode you turn off server rendering and list the paths to prerender:
import type { Config } from "@react-router/dev/config";
export default {
ssr: false,
prerender: ["/", "/about", ...posts.map((p) => `/post/${p.id}`)],
} satisfies Config;A few things I ran into:
Only prerendered routes can have a loader, so my catch-all 404 route has none and just throws a 404 response from the component.
In React Router v8 the meta function receives loaderData, not data. I had every post titled “Not found” until I changed that.
The build writes about 100 HTML pages plus a __spa-fallback.html. I copy that file to 404.html after the build so unknown URLs show the site's 404 page.
Styling is Tailwind v4 with CSS variables for the colors, so the monthly accent and dark mode are just a different set of variables on the html element.