Documentation
Getting started
The five-minute mental model of how ded-blog is built and where content lives.
The blog is an Astro site deployed to Cloudflare Pages. Content lives in Sanity. Every time you publish something in Sanity, a webhook fires a GitHub repository_dispatch event, GitHub Actions builds the site fresh with your new content, and Cloudflare Pages picks up the deploy.
The moving parts
- Sanity — content lake. Holds
post,page,project, andauthordocuments. Project id:3onlytdh. Dataset:production. - GitHub — code and CI. Every push to
mainbuilds. Every Sanity publish also triggers a build viarepository_dispatch. - Cloudflare Pages — hosting. Static output from
astro build, served from Cloudflare’s edge.
The publish loop
Studio or CLI
│
▼
┌─────────┐
│ Sanity │ — document created/updated
└────┬────┘
│ webhook
▼
┌─────────┐
│ GitHub │ — repository_dispatch → CI workflow
└────┬────┘
│ builds astro, deploys via wrangler
▼
┌─────────┐
│ Pages │ — new content live in ~90s
└─────────┘
Two ways to publish
- From Studio — visual editor at
ded-blog.sanity.studio. Best for rich content or when you want to preview as you write. - From the CLI — one command against a markdown file. Best for AI-drafted content or when you want to write in your editor without touching a browser.
Either path triggers the same downstream flow. There’s no “correct” one — pick whichever fits the moment.
Local development
git clone https://github.com/asdtransport/ded-blog
cd ded-blog
cp .env.example .env # add your Sanity project ID and read token
bun install
bun run dev # http://localhost:4321
The dev server reads content from Sanity in real time (with the token). Everything else runs offline.
Where to go next
- Publishing from the CLI — the fastest way to add a post
- Content model — every field on every document type
- Troubleshooting — when the loop doesn’t loop