Building a Blog with Astro and Cloudflare Pages

This blog runs on Astro deployed to Cloudflare Pages.

Why Astro

Astro ships zero JavaScript by default. Every page is static HTML — fast to load and easy to cache at the edge.

Posts are written in Markdown with frontmatter for metadata like title, date, and tags.

Why Cloudflare Pages

  • Global edge network
  • Free tier is generous
  • Automatic deploys from Git

Full-text search is powered by Pagefind, which indexes the built HTML and runs entirely client-side. No external service needed.

# Build and index
npm run build

The index is generated automatically as part of the build.