// The content source for the blog. // // This is a plain in-repo array — the simplest stand-in for a CMS. In a // real app, swap the body of `getStaticPaths` + the page loader to read // from your CMS / database / filesystem instead. NOTHING else changes: // the build still pre-renders one HTML file per entry. // // Because this module is imported by both the index page (the list) and // the [slug] page (the detail) AND by `getStaticPaths`, it is the single // source of truth for "which posts exist". export interface Post { /** URL segment — `/blog/`. Must be unique + DNS-safe. */ readonly slug: string readonly title: string /** ISO date, shown + used for ordering. */ readonly date: string /** One-line summary — feeds the list + the ``. */ readonly excerpt: string readonly readingMinutes: number /** Body paragraphs, separated by a blank line. */ readonly body: string } export const posts: ReadonlyArray = [ { slug: 'hello-static', title: 'Why this blog ships zero JavaScript', date: '2025-01-15', excerpt: 'Every page is pre-rendered at build time, so the browser downloads HTML and nothing else.', readingMinutes: 3, body: `This page was rendered ONCE, when you ran \`voltro build\`. The result is a flat \`dist/blog/hello-static/index.html\` that any CDN can serve in single-digit milliseconds. There is no server rendering per request, no React hydration on the list page, no rpc client on the wire. The list page even declares \`interactive = 'none'\`, which strips every \`