A static blog theme built with Astro — posts, standalone pages, friend links, projects, and site search out of the box.
English | 中文
- Pure Astro & Static — Zero React/Vue runtime; ships with neutral demo content and local assets.
- Site Search — Pagefind indexes posts, standalone pages, friend links, and projects.
- Reading Experience — Responsive layout, syntax highlighting, build-time Mermaid diagrams, and collapsible TOC.
- Tags & SEO — Case-insensitive paginated tags, OpenGraph, Sitemap, summary-only RSS, and Web App Manifest.
- Theme Mode & Motion — Flash-free system / light / dark modes with restrained, reduced-motion-aware transitions.
- Bilingual UI — English and Chinese interface (
en/zh) with per-post language support. - Optional Comments — Twikoo support, disabled by default.
Requires Bun (plus a Chromium-based browser only when building posts with Mermaid diagrams).
npx degit Jazee6/astro-blur#main my-blog
cd my-blog
bun install
bun run devCommon scripts:
| Command | Description |
|---|---|
bun run dev |
Start dev server |
bun run new <path> |
Create a post under src/content/posts/ |
bun run build |
Type-check, build, and generate Pagefind index |
bun run preview |
Preview the production build locally |
src/
├── content/
│ ├── posts/ # Posts (nested directories and .md / .mdx supported)
│ ├── pages/ # Standalone pages
│ └── data/ # Friend links and projects
└── config.ts # Site configuration
Edit src/config.ts to configure site metadata, navigation, social links, pagination, site language, and comments.
- Site language: Set
language(enby default; supportsenandzh/zh-CN, others fall back toen). - Comments: Disabled by default. Set
twikooUrito your Twikoo endpoint to enable (loaded from jsDelivr v1.7.19 with SRI).
bun run new supports nested paths and preserves .md / .mdx extensions:
bun run new hello-world # src/content/posts/hello-world.md
bun run new notes/2026/hello # src/content/posts/notes/2026/hello.md
bun run new notes/hello.mdx # src/content/posts/notes/hello.mdxFor a post written in a different language than the site, set lang in frontmatter:
---
title: 你好
lang: zh # optional, defaults to site language
---Only post content is marked with
lang; the surrounding UI stays in the site language. If your site mixes CJK posts with another site language, addforce_language: zh(orja) to a rootpagefind.ymlfor in-sentence search.
Markdown/MDX files under src/content/pages/ map directly to URLs, including subdirectories (pages/docs/guide.md → /docs/guide):
---
title: About
description: About this site # optional, defaults to title
comments: true # optional, defaults to false (requires twikooUri)
---Paths must not collide with reserved paths (posts, tags, links, projects, rss.xml, robots.txt, 404, pagefind, sitemap, or numeric homepage pagination) — conflicts fail the build.
Mermaid code blocks render at build time into separate light and dark SVGs (zero client-side JS). The build looks for Edge, Chrome, or Playwright Chromium (bunx playwright install chromium), and fails on missing browsers or invalid diagrams.
PRs are welcome to add your site.
