← All articles

Building a technical blog with Astro and Cloudflare

From Markdown to static pages to your own domain: a simple, maintainable workflow for technical writing.

A technical blog is a place to write. A useful toolchain makes writing, previewing, and publishing a clear loop: articles live in Git, pages are generated at build time, and an edge network serves them after deployment.

This is a sample article included with the initial blog setup. Edit or remove it when you start documenting your own work.

Start with an article

This site uses Markdown. Articles live in src/content/posts/. The frontmatter at the beginning of each file describes its title, summary, date, language, and tags.

---
title: 'My first technical note'
description: 'A problem and the process of solving it.'
pubDate: 2026-10-09
lang: en
tags: ['Engineering']
draft: false
---

The filename becomes part of the article URL. For example, first-note.md with lang: en is published at /en/posts/first-note/. Keep the path stable so that saved links continue to work.

Preview locally

Run these commands in the blog directory:

npm ci
npm run dev

Open the local address shown in the terminal. Changes to Markdown and styles appear in the browser as you work.

Before publishing, check the project and preview a full build:

npm run check
npm run build
npm run preview

The generated files live in dist/. These are build artifacts; source files and the dependency lockfile are what belong in version control.

Publish to Cloudflare

This project serves static assets with Cloudflare Workers. Wrangler reads wrangler.jsonc and uploads the pages in dist/.

npx wrangler login
npm run deploy

The configured Custom Domain is blog.datumframe.com. Its Cloudflare zone must be active and belong to the account used for deployment.

The full instructions for the first deployment and automated Git deployments are in the project’s DEPLOYMENT.md.

Keep writing

Once publishing is reliable, start the next article with a real problem:

  1. Record what happened and the surrounding context.
  2. Explain the approaches you tried and the evidence for ruling them out.
  3. Describe the tradeoffs in the final solution.
  4. Leave reproducible steps and any remaining limitations.

An article does not have to be finished at once. Keep it as a draft with draft: true; when ready, change it to false, commit, and rebuild to publish.

References: Astro content collections, Astro’s Cloudflare deployment guide.

End of noteBack to archive ↗