Building This Blog with Astro and Cloudflare Pages
A quick writeup of the stack behind this blog and the decisions behind it.
Stack
- Astro - static site generator. Outputs plain HTML with zero JS by default, which means fast page loads and nothing unnecessary sent to the browser.
- Tailwind CSS v4 - utility-first CSS. No unused styles shipped, and the
@tailwindcss/typographyplugin handles all the prose styling for posts like this one. - Pagefind - full-text search that runs entirely client-side. The index is built from the static HTML at build time, so no external search service is needed.
- Cloudflare Pages - static hosting on Cloudflare’s global edge network. Deploys automatically on every push to
main.
Writing posts
Posts are Markdown files in src/content/blog/. Each file has frontmatter for metadata:
---
title: Post Title
description: One-line summary
date: 2026-05-29
tags: [tag1, tag2]
---
Content here...
The filename becomes the URL slug - my-post.md is served at /my-post.
Deployment
Pushing to main triggers a Cloudflare Pages build:
npm run build- Astro generates static HTML intodist/, then Pagefind indexes it- Cloudflare deploys
dist/to the edge
That’s it. No server to manage, no database, just files.