How this blog is built
A static Astro site with GPU shaders in the header and a comment system running on Cloudflare's free tier — and no server to keep alive.
This site has no backend that runs all the time. It is a folder of HTML, generated once from Markdown, served from Cloudflare’s edge. And yet you can comment on it and react to it. Here is how those two facts coexist.
The pages are static
Every post is a Markdown file in src/content/blog. At build time, Astro turns
each one into a plain HTML page. There is nothing to attack, nothing to patch,
nothing that falls over under load. Writing a post is: add a file, push to git,
done. Cloudflare rebuilds and redeploys on its own.
The comments are not
Comments need somewhere to write data, and static files can’t do that. So
the comment box talks to a small function that lives at /api/comments. On
Cloudflare Pages, any file under functions/ becomes a tiny serverless handler
— it only runs when someone actually calls it, and the free tier allows a
generous number of those calls per day.
functions/
api/
comments.js ← GET to list, POST to add
reactions.js ← POST to bump a reaction count
Each handler reads and writes a D1 database — Cloudflare’s SQLite that also sits on the edge and also has a free tier. Two tables, a handful of columns. That’s the entire “backend.”
What that buys you
- No monthly bill for a normal-sized personal blog.
- No server to maintain — nothing to update or reboot.
- Fast everywhere, because both the pages and the data live at the edge.
The tradeoff is that comment moderation is manual and features are basic by design. For a personal site, that is usually the right amount.
Comments