The blog template that ships with a browser-based admin panel β write and publish MDX posts without touching a text editor.
Built on Astro 6 + Tailwind CSS 4, zero JS on reading pages, 100 Lighthouse across all four categories.
![]() |
![]() |
bunx degit vstorm-co/astro-blog my-blog && cd my-blog && bun install && bun run devOpen http://localhost:4321/admin/ β your blog editor is ready.
npm users:
npx degit vstorm-co/astro-blog my-blog && cd my-blog && npm install && npm run dev
- π Built-in admin panel β browser-based MDX editor with live preview, autosave, drag-and-drop images, and a component palette. Stripped from every production build.
- β‘ Zero JS on reading pages β no framework runtime, no hydration cost. Home page ships 0 KB of JavaScript.
- π MDX-first with 22 ready-made blog components:
Callout,Figure,Stat,Timeline,Terminal,FileTree,Diff,Gallery,Tweet,Bookmark, and more - π¨ Single-file config β title, author, nav, socials, accent colour, feature flags all in
src/site.config.ts - π Dark + light mode with pre-paint init (zero FOUC) and
prefers-color-schemefallback - βοΈ Scheduled posts β set a future
pubDate, post goes live on the next build after that time - π·οΈ Tag pages auto-generated from frontmatter
- π‘ RSS feed, sitemap, robots.txt built at compile time
- π One-click deploy to Vercel, Netlify, or Cloudflare Pages
- π· TypeScript + Zod schemas β typed frontmatter, zero runtime surprises
- π ESLint + Prettier + Husky β enforced code style from the first commit
| astro-blog | AstroPaper | Fuwari | Raw Astro | |
|---|---|---|---|---|
| Admin panel (browser editor) | β | β | β | β |
| Zero JS on reading pages | β | β | β | β |
| 100 Lighthouse (all 4) | β | β | β | β |
| 22 MDX components | β | β | β | β |
| Drag-and-drop image upload | β | β | β | β |
| Scheduled posts | β | β | β | β |
| Single-file config | β | β | β | β |
| Dark + light mode | β | β | β | β |
| One-click deploy | β | β | β | β |
The admin panel is the differentiator β no other Astro blog template ships one.
After cloning, open src/site.config.ts and work through this list:
- Set your identity β
website,title,author,description,accent - Update socials β edit
src/socials.ts, keep only the providers you use - Rewrite the About page β
src/data/pages/about.mdxor use the admin panel - Delete example posts β remove everything in
src/data/blog/and write your own - Replace the favicon β drop your SVG at
public/favicon.svg - Set an OG image β 1200Γ630 PNG at
public/og-default.png(or runpython3 scripts/generate-og.py) - Deploy β push to GitHub and click one of the deploy buttons below
- Protect
mainβ on GitHub: require PR + CI green before merge - Turn on Discussions β for open-ended questions from readers
- Fill
.github/FUNDING.ymlβ if you accept sponsorship
Start the dev server and open localhost:4321/admin/:
- Split-pane MDX editor with autosave (2 s debounce,
Cmd+Sforces save) - Component palette β click Insert, snippet + import land at your cursor
- Image drag-and-drop β files written to
public/images/blog/<slug>/ - Live preview inside an iframe of the real post layout
- Rename slug / delete post from the sidebar
The admin panel is dev-only β production builds 404 the route.
bun run new-post "My post title"
# β src/data/blog/my-post-title.mdx (draft: true by default)---
title: "My post title"
description: "One-line summary β used in meta tags and post cards."
pubDate: 2026-05-01
updatedDate: 2026-05-15 # optional
author: "Jane Doe"
tags: ["astro", "mdx"]
draft: false # excluded from prod builds when true
featured: false # pinned to the home page featured strip
cover: "./cover.jpg" # optional, relative to the MDX file
ogImage: "/custom-og.png" # optional per-post OG override
canonicalURL: "https://β¦" # optional, for cross-posts
---Set pubDate to a future date. The post is invisible until the next build after that time. For automatic builds:
- Add a
DEPLOY_HOOK_URLrepo secret (Vercel / Netlify / CF each provide one). - Set repo variable
SCHEDULED_REBUILD=1. .github/workflows/scheduled-rebuild.ymlhits the hook hourly.
22 components grouped by purpose:
| Group | Components |
|---|---|
| Prose | Callout InfoCard PullQuote Aside |
| Data | Stat TwoColumn Comparison Timeline |
| Media | Figure Gallery VideoEmbed Tweet Bookmark |
| Technical | CodeGroup Terminal FileTree Diff Kbd Details |
| Structure | Steps Badge Divider |
All components live in src/components/blog/. See them in action in src/data/blog/mdx-component-reference.mdx.
Drop an .astro file in src/components/blog/ with three annotation comments:
{/* @mdx-label MyComponent */}
{/* @mdx-description One-line description shown in the palette. */}
{
/* @mdx-snippet
<MyComponent prop="example">
Body text
</MyComponent>
*/
}The admin palette picks it up on the next refresh β no other code changes needed.
| File | What you change |
|---|---|
src/site.config.ts |
Title, author, nav, socials, accent colour, feature flags |
src/socials.ts |
Social links and share targets |
src/styles/global.css |
Design tokens β colours, fonts, radii, shadows |
src/styles/prose.css |
Post body typography |
src/data/blog/ |
Blog posts |
src/data/pages/ |
About / Uses / Now / etc. |
public/favicon.svg |
Favicon |
public/og-default.png |
Default OG image (1200 Γ 630 px) |
features: {
search: false, // Pagefind-powered /search/ page (requires build step)
archive: true, // /archive/ β chronological post list
dynamicOg: false, // per-post OG via Satori
editPost: false, // "Edit on GitHub" link on each post
adminPanel: true, // dev-only admin UI
lightAndDarkMode: true, // theme toggle visible / hidden
}| Command | Action |
|---|---|
bun run dev |
Start dev server at localhost:4321 |
bun run build |
Type-check + build to ./dist/ |
bun run preview |
Preview the production build locally |
bun run new-post "Title" |
Scaffold a new draft post |
bun run optimize-images |
Resize + convert blog images to WebP |
bun run lint |
Run ESLint |
bun run format |
Format with Prettier |
bun run test |
Run Vitest unit tests |
src/
ββ site.config.ts # β start here: identity, nav, features
ββ socials.ts
ββ content.config.ts # Zod schemas
ββ data/
β ββ blog/ # MDX posts
β ββ pages/ # About, Uses, etc.
ββ layouts/ # Base / Post / Page
ββ components/
β ββ blog/ # 22 MDX components
β ββ layout/ # Header / Footer / SEO
β ββ home/ # Hero / LatestPosts / FeaturedStrip
β ββ post/ # PostCard / TOC / Pagination / ShareLinks
β ββ islands/ # React islands (CopyCode, Search, TOC scrollspy)
β ββ admin/ # dev-only admin panel
ββ lib/
β ββ posts.ts # content helpers
β ββ schemas.ts # JSON-LD builders
β ββ slug.ts
ββ pages/ # file-based routes
ββ styles/ # global.css, prose.css
public/
ββ favicon.svg
ββ og-default.png
ββ _headers / _redirects # Cloudflare Pages headers
ββ images/blog/<slug>/ # per-post images (managed by admin)
scripts/
ββ new-post.ts # post scaffolder
ββ optimize-images.py # WebP optimiser
ββ generate-og.py # OG image generator
| Platform | One-click |
|---|---|
| Vercel | |
| Netlify | |
| Cloudflare Pages |
Security headers and /admin/* blockers are pre-configured for all three in vercel.json, netlify.toml, and public/_headers.
| Framework | Astro 6 |
| Content | MDX + Astro Content Collections |
| Styling | Tailwind CSS 4 + CSS custom properties |
| Syntax highlighting | Shiki via Expressive Code |
| Editor (admin) | CodeMirror 6 |
| Type checking | TypeScript strict mode |
| Testing | Vitest |
| Linting / formatting | ESLint + Prettier |
| Git hooks | Husky + lint-staged |
Why Astro, not Next.js? Content-first. Zero JS by default, typed frontmatter via content collections, no runtime framework lock-in.
Can I use pure Markdown instead of MDX?
Yes β rename .mdx β .md. The content loader accepts both. MDX components only work in .mdx files.
How do I add comments?
We don't ship a comment system. Giscus takes ~10 lines at the bottom of src/layouts/PostLayout.astro.
Is the admin panel safe to expose publicly?
No. It has no authentication and writes to your filesystem. It binds to 127.0.0.1 in dev and production builds 404 the route.
Will there be i18n? Not in this template. Use Astro's i18n recipe directly.
See CONTRIBUTING.md for coding conventions, commit style, and how to run the test suite. Issues and PRs welcome.
Please read CODE_OF_CONDUCT.md before participating. Report security vulnerabilities via SECURITY.md.
We're Vstorm β an Applied Agentic AI Engineering Consultancy.
astro-blog is the template we use for our own writing. We build production-grade web apps too.
Built on Astro Β· Tailwind CSS Β· MDX Β· Shiki Β· CodeMirror



