How this blog works
Astro, markdown, a GitLab repository and Cloudflare. And a language model that checks the spelling and writes the English version.
This blog is a static site. Every post is a markdown file in a GitLab repository, and Cloudflare rebuilds the site on every push.
The stack
- Astro turns the markdown into HTML. No JavaScript runs in the browser.
- GitLab stores the source files and runs CI.
- Cloudflare Workers serves the built files from its network.
Writing in Dutch, publishing in two languages
I write in Dutch. A CI job checks the spelling and produces an English translation. Each translation keeps a hash of the Dutch text it was made from:
---
title: How this blog works
sourceHash: 3f9a1c0b7d2e
---
When the hash no longer matches the original, the translation is out of date and the job makes a new one. Everything happens on a separate branch, so I review the changes before they go live.
Running it locally
npm install
npm run dev # http://localhost:4321
npm run translate # requires ANTHROPIC_API_KEY