Ddmt-Blog: A Git-Driven Markdown Blog
What is Ddmt-Blog
Ddmt-Blog is a lightweight, HTML-first blog system built on top of Bun and Astro. It uses Markdown files as the single source of truth for all content, with Git as the content management layer.
No database. No admin panel. Just Markdown, Git, and a fast build pipeline.
Core Principles
- Git-driven content — Your Gitea (or compatible) repository IS your CMS. Push a Markdown file, and the blog rebuilds automatically via webhook.
- Markdown as data — Every post, page, and piece of structured data lives in
.mdor.yamlfiles under thecontent/directory. - Static-first, SPA-enhanced — The site builds to static HTML by default, with Astro’s ClientRouter for smooth client-side page transitions.
- Zero database — No SQL, no Redis, no external storage. Everything is files on disk.
- Lightweight runtime — A single Bun process serves static files, handles webhooks, and triggers rebuilds.
Tech Stack
| Layer | Technology |
|---|---|
| Runtime | Bun |
| Framework | Astro 6 |
| Styling | TailwindCSS 4 |
| Search | Pagefind |
| Code Highlight | Shiki |
| Content Sync | Git SSH + Gitea Webhook |
How It Works
- You write a Markdown file and push it to your Git repository.
- Gitea sends a webhook POST to the blog server.
- The server verifies the signature, pulls the latest content, and triggers a full Astro rebuild.
- The new static files are served immediately.
The entire cycle — from push to live — takes a few seconds.
Project Structure
content/
posts/ # Markdown articles (yyyy/mm/slug.md)
pages/ # Template pages (about.md, friends.md)
data/ # Structured data (friends.yaml, site.json)
assets/ # Static images and files
src/
pages/ # Astro routes and templates
layouts/ # Page layouts
components/ # UI components
server/ # Webhook and sync logic
app/
server.ts # Bun HTTP server entry point
Features
- Author card and website info from webhook data
- Category and tag system
- Full-text search via Pagefind
- Dark/light theme toggle
- RSS feed and sitemap
- SEO meta tags and OpenGraph
- Friends page with YAML-driven link groups
- Archive and timeline views
- Build info footer (commit SHA + build time)
Next Steps
Check out the configuration guide for deployment instructions, environment variables, and Docker setup.