1 min read
Building With Astro
Astro takes a content-first approach that works well for blogs. Pages are static by default, JavaScript is opt-in, and the content collections API gives you type-safe frontmatter.
Why static
Static sites are fast, cheap to host, and require no server maintenance. Cloudflare Pages serves them from the edge globally for free.
Content collections
Collections give you Zod-validated frontmatter, TypeScript types for free, and a clean API for querying posts.
const posts = await getCollection('blog', ({ data }) => !data.draft);