Minimal Astro blog with a built-in CMS at /admin, deployable to Cloudflare in one click.
This is the theme powering doedja.com. The private blog is kept in a separate repo; this is the stripped, generic version.
- Markdown posts in
src/content/posts/{category}/*.md - Pages in
src/content/pages/*.md - Sveltia CMS at
/admin, logs in with GitHub, commits to your repo - Runs as a single Cloudflare Worker with static assets — no separate worker for OAuth
If you fork under a different username, update the button URL in your README to match.
-
Fork and deploy. Click the button above. Cloudflare forks this repo to your GitHub and creates a Worker project. The first build runs
bun run buildautomatically. -
Register a GitHub OAuth app at https://github.com/settings/developers → New OAuth App:
- Homepage URL:
https://<your-worker-url> - Authorization callback URL:
https://<your-worker-url>/api/auth/callback
Copy the Client ID. Generate a client secret and copy that too.
- Homepage URL:
-
Add environment variables in Cloudflare → your Worker → Settings → Variables and Secrets:
Name Value Type GITHUB_REPOyour-username/your-forkplaintext GITHUB_BRANCHmain(optional)plaintext GITHUB_CLIENT_IDfrom step 2 secret GITHUB_CLIENT_SECRETfrom step 2 secret -
Redeploy (Deployments tab → latest → Retry). Then visit
/adminand log in with GitHub.
bun install
bun run dev # Astro dev server (no worker routes)
bun run dev:worker # Full worker + assets via wranglerFor /admin to work locally you also need a .dev.vars file with the env vars. See .env.example.
Edit posts in src/content/posts/, pages in src/content/pages/. Push to trigger a rebuild.
- Site metadata:
site.config.ts - Navigation:
src/layouts/Base.astro - Styles:
src/styles/global.css - Post template:
src/layouts/Post.astro - CMS collections:
src/api/admin-config.ts— add fields or new categories here
- Create
src/content/posts/<category>/and drop markdown files in. - Add a matching collection entry in
src/api/admin-config.ts. - Push. The home page, archive, and RSS pick it up automatically.
MIT