← 返回全部文章

How This Blog Is Built: Astro + Decap CMS + Vercel

This is the first real post here, so it felt right to write about how the blog itself works.

The stack

  • Astro — generates the site as static HTML, so pages load fast and there’s no server to manage.
  • Markdown — every post is a plain .md file with some frontmatter (title, date, category) on top and the article body underneath. No database, no lock-in.
  • Decap CMS — a web-based editor at /admin that gives me a form and a live Markdown preview instead of hand-writing files.
  • GitHub — the single source of truth. Both the site’s code and every blog post live in one repo.
  • Vercel — watches the repo and rebuilds the site automatically on every push.

How writing a post actually works

  1. Open /admin and log in with GitHub.
  2. Fill in the title, pick a category, write the body in Markdown (with live preview), and optionally upload a cover image.
  3. Click Publish. Decap commits a new Markdown file straight to the GitHub repo — no manual git commands.
  4. Vercel picks up the new commit, rebuilds the site, and the post is live within a minute or so.

Why this setup

The part I like most: the content isn’t trapped inside some CMS database. It’s just Markdown files in a Git repo, so I can always read, edit, or move them with any tool — the CMS is just a nicer way to edit them, not a requirement.

Next up: actually writing about things other than the blog itself.