Haani Tharak

· 1 min read

Building this site with Astro and Cloudflare Pages

A static personal site with a blog, RSS, and zero server — and how it deploys.

This site is intentionally boring infrastructure: static HTML built by Astro, served from Cloudflare’s edge. Here’s the shape of it.

Content as files

Blog posts live in src/content/blog/ as Markdown. A schema in src/content.config.ts validates the frontmatter at build time, so a typo in a date fails the build instead of shipping broken. Projects work the same way, under src/content/projects/.

Adding a post is: create a .md file, write, commit, push. Cloudflare rebuilds and deploys automatically.

Why static

  • Speed. Every page is HTML on a CDN. Nothing to spin up.
  • Cost. Free on Cloudflare Pages for a site this size.
  • Longevity. No dependencies that rot into a security problem while I’m not looking. If Astro vanished tomorrow, the built dist/ folder still works.

Deploying

Cloudflare Pages watches the GitHub repo. On push to main it runs npm run build and publishes dist/. The custom domain is a one-time DNS setting since the domain’s nameservers are already on Cloudflare.

That’s the whole system. The best part is how little there is to maintain.

#astro#cloudflare#web

← All writing