{"id":45,"slug":"astro-content-collections-zod","title":"Astro Content Collections (stable since 2.0, modernized in Content Layer API late 2024): Zod-validated frontmatter, build-time TypeScript types","kind":"reference","scope":"business","status":"current","audiences":["claude-code","dev","candid-team"],"topics":["headless-cms","content-architecture","knowledge-base"],"reference_body":"**Claim:** Astro's Content Collections (stable since Astro 2.0; Content Layer API in Astro 5, late 2024) use **Zod schemas for build-time validation** of Markdown/MDX frontmatter, with auto-generated TypeScript types. The Astro team's own astro.build website uses Zod-validated Content Collections for blog, integrations, showcase, and authors — with refinements that explicitly reject scraping-error strings like \"Just a moment…\" in titles.\n\n**Sources:** <https://docs.astro.build/en/guides/content-collections>; deepwiki.com/withastro/astro.build.\n\n**Confidence:** Verified.\n\n**Why this matters for Candid:** Astro Content Collections (or the equivalent in any framework: gray-matter + Zod, MDX-on-Next.js, Contentlayer) is the **structural mechanism that makes a KB-shaped marketing site practical**. Schema validation at build time is the structural equivalent of Wikipedia's verifiability policy — it makes missing sources, dates, or confidence flags impossible to ship. This is the technical pattern Candid uses on candidcreative.ca.","rationale_body":null,"metadata":null,"links":{"outgoing":[{"slug":"matuschak-evergreen-notes","title":"Andy Matuschak: evergreen notes — atomic, concept-oriented, densely linked, accreting over time","kind":"reference","scope":"business","link_type":"relates-to"}],"incoming":[{"slug":"research-brief-kb-backed-website-methodology","title":"Research brief: The knowledge-base-backed website (piece 3 of 15)","kind":"reference","scope":"business","link_type":"relates-to"}]},"created_at":"2026-05-22T18:57:39.655Z","updated_at":"2026-05-22T18:57:39.655Z"}