Static blogging with Astro and Keystatic
This blog is built from markdown files with Astro. There is no database and no runtime rendering — every page you see is a static HTML file generated at build time. Keystatic adds a small admin UI on top that edits those same files.
Why static
Static pages are the right default for a personal blog:
- Fast. nginx serves a file. Nothing to compute per request.
- SEO-friendly. The full article HTML is in the initial response, so crawlers and social scrapers see real content — not an empty
<div>. - Cheap and durable. No server process to crash, no DB to back up.
How a post becomes a page
- Write (or edit in Keystatic) a markdown file with some frontmatter.
astro buildreads the content collection and renders each post.- The result is written to
dist/blog/<slug>/index.htmlwith SEO meta, RSS and a sitemap alongside it.
import { getCollection } from "astro:content";
const posts = await getCollection("posts");
GFM works out of the box
| Feature | Supported |
|---|---|
| Tables | yes |
| Task lists | yes |
| Strikethrough | yes |
- [x] Render markdown
- [x] Generate RSS + sitemap
- [ ] Write more posts
The public site ships zero client-side JavaScript. Keystatic's React UI only loads in the editor, never on a published page.
That's the entire idea.