A modern, feature-rich static blog template built with Astro, featuring advanced functionality and beautiful design.
π₯οΈ Live Demo | π Documentation
π README Languages: English / δΈζ / ζ₯ζ¬θͺ / ηΉι«δΈζ /
Get started quickly with our comprehensive documentation. Whether you're customizing your theme, configuring features, or deploying to production, the documentation covers everything you need to launch your blog successfully.
π Read Full Documentation β
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Built with Astro and Tailwind CSS
- Smooth animations and page transitions using Swup
- Light/dark theme switching with system preference detection
- Customizable theme colors, banner carousel, and fullscreen wallpapers
- Switchable wallpaper modes with opacity and blur controls
- Configurable sidebar components, ordering, and responsive layouts
- Optional automatic page scaling for wide screens
- Fully responsive design for all devices
- Custom or system font modes, including JetBrains Mono and CJK fonts
- Advanced search functionality based on Pagefind
- Markdown and MDX extensions with syntax highlighting
- Interactive table of contents with auto-scrolling
- Full-content RSS and Atom feeds using the same Markdown/MDX pipeline as article pages
- Reading time estimation
- Article categorization, tagging, pinning, aliases, and custom permalinks
- Optional password-protected posts with a documented static-site security boundary
- Anime Page - Track anime watching progress using local data, Bangumi, or Bilibili sources
- Friends Page - Showcase friend websites with cards and tags
- Diary Page - Share moments with text, images, locations, moods, and tags
- Albums Page - Organize local or external photo albums with optional encryption
- Projects, Skills, Devices, and Timeline Pages - Showcase structured personal data
- AI Tools Page - Maintain a searchable catalog of tools
- Archive and About Pages - Browse posts or publish a custom introduction
- Enhanced code blocks based on Expressive Code
- Math formulas with KaTeX, plus Mermaid and PlantUML diagrams
- Image enhancements including responsive sizing, automatic grids, and Fancybox lightboxes
- SEO optimization including sitemap, robots.txt, RSS, Atom, and optional Open Graph images
- Performance optimization with lazy loading and caching
- Comment system with Twikoo or Giscus integration
- Music player with local and Meting modes
- Live2D mascot support through Pio
-
Clone the repository:
git clone https://github.com/LyraVoid/Mizuki.git cd Mizuki -
Install dependencies:
# Enable the package manager version declared by the project corepack enable # Install project dependencies pnpm install
-
Configure your blog (optional):
- Set
ENABLE_CONTENT_SYNC=falsein a root.envfile if you want to use only local content. - Edit
src/config/siteConfig.tsand the other modules insrc/config/to customize the site. - At minimum, replace
siteURLwith the public URL of your deployment.
- Set
-
Start the development server:
pnpm dev
Your blog will be available at
http://localhost:3000
- Create a post:
pnpm new-post -- <filename>; both.mdand.mdxare supported. - Edit posts: Modify files in
src/content/posts/. - Edit About or Friends page content: Modify the corresponding files in
src/content/spec/. - Edit structured page data: Modify the relevant files in
src/data/. - Add article-local images: Keep them next to the post and reference them with a relative path such as
./cover.webp. - Add public images: Place them under
public/and reference them with a root-relative path such as/images/example.webp.
Before publishing: This repository includes demo posts, page data, albums, and images. Remove or replace the sample content before deploying your own site.
Deploy your blog to any static hosting platform:
-
Vercel: Connect your GitHub repository to Vercel
-
Netlify: Deploy directly from GitHub
-
GitHub Pages: Use the included GitHub Actions workflow
-
Cloudflare Pages: Connect your repository
-
Environment Variable Configuration (Optional): Refer to
.env.examplefor configuration
Before deployment, update siteURL in src/config/siteConfig.ts. Do not commit .env or credentials to Git. For hosted builds, configure environment variables in the hosting provider instead.
The optional .env.example settings include Bilibili session data and IndexNow credentials. Only configure them when needed, keep them in local or hosting-provider secrets, and never commit real values.
Posts use .md or .mdx files under src/content/posts/. The only required frontmatter fields are title and published; optional fields cover summaries, images, tags, categories, drafts, pinning, comments, aliases, permalinks, attribution, and browser-side encryption.
Markdown and MDX support callouts, KaTeX math, Expressive Code, Mermaid, PlantUML, GitHub cards, Wiki Links, spoilers, responsive images, image grids, lightboxes, and HTML embeds. Encrypted posts are excluded from RSS and Atom, but browser-side encryption is not server-side access control.
See the complete Content Authoring Guide for the frontmatter schema, writing syntax, image rules, diagrams, video embeds, encryption limits, and publishing checklist.
Mizuki uses one Markdown/MDX pipeline for article pages, RSS, and Atom. It supports callouts, math, enhanced code blocks, Mermaid, PlantUML, GitHub cards, Wiki Links, spoilers, responsive images, image grids, Fancybox lightboxes, and HTML embeds.
For syntax and examples, see the Content Authoring Guide. PlantUML uses the public server configured in src/config/markdownConfig.ts by default, so diagrams must not contain secrets or private data.
Run commands from the project root:
| Command | Action |
|---|---|
pnpm install |
Install dependencies. |
pnpm dev |
Start the development server at http://localhost:3000. |
pnpm build |
Build the production site in ./dist/, generate search data, and run build checks. |
pnpm preview |
Preview the production build locally. |
pnpm run check |
Run Astro diagnostics. |
pnpm run type-check |
Run TypeScript without emitting files. |
pnpm test |
Run the Markdown, layout, image, music, and crypto tests. |
pnpm run format |
Format source files with Biome. |
pnpm run lint |
Check and automatically fix source files with Biome. |
pnpm new-post -- <filename> |
Create a new Markdown or MDX post. |
pnpm run sync-content |
Synchronize an optional external content repository. |
pnpm run init-content |
Interactively initialize external content synchronization. |
pnpm astro ... |
Run an Astro CLI command. |
Configuration is split into focused modules under src/config/; src/config/index.ts is the shared export entry point. The main site settings live in src/config/siteConfig.ts:
export const siteConfig: SiteConfig = {
title: "Your Blog Name",
subtitle: "Your Blog Description",
siteURL: "https://example.com/", // Keep the trailing slash
lang: "en", // e.g. "zh_CN", "ja", or "zh_TW"
timeZone: "Europe/London", // Any valid IANA time zone
themeColor: {
hue: 210, // 0β360
fixed: false, // Hide the visitor theme-color picker when true
},
featurePages: {
anime: true,
diary: true,
friends: true,
projects: true,
skills: true,
timeline: true,
albums: true,
devices: true,
aiTools: true,
},
// Keep the remaining fields from the template defaults.
};Other commonly used configuration files include:
src/config/navBarConfig.tsβ navigation links and menus.src/config/profileConfig.tsβ avatar, name, bio, and social links.src/config/sidebarConfig.tsβ sidebar widgets, order, positions, and responsive behavior.src/config/backgroundWallpaper.tsandsrc/config/effectsConfig.tsβ wallpaper and visual effects.src/config/commentConfig.tsβ global Twikoo or Giscus settings. Comments are disabled by default; setenable: trueand configure the selected provider before using them.src/config/musicConfig.tsβ music player mode and playlist source.src/config/markdownConfig.tsβ Wiki Links, automatic image grids, and PlantUML.src/config/permalinkConfig.tsβ optional global permalink format.src/config/expressiveCodeConfig.tsβ code block themes and behavior.
The page switches are controlled by siteConfig.featurePages. Page content and data are kept separate from page templates:
| Page | Content or data source |
|---|---|
| About | src/content/spec/about.md |
| Friends | src/content/spec/friends.md and src/data/friends.ts |
| Anime | src/config/siteConfig.ts for the source mode; src/data/anime.ts for local data |
| Diary | src/data/diary.ts, or a Memos endpoint configured by diaryApiUrl |
| Albums | public/images/albums/; each local album uses an info.json file |
| Projects | src/data/projects.ts |
| Skills | src/data/skills.ts |
| Devices | src/data/devices.ts |
| Timeline | src/data/timeline.ts |
| AI Tools | src/data/ai-tools.ts |
Avoid editing src/pages/*.astro just to change page content; those files define the layout and rendering behavior.
Mizuki can separate theme code from blog content into two repositories. This is useful for private content, independent content versioning, or collaboration, but it is optional.
Quick Selection:
| Use case | Configuration | Content location |
|---|---|---|
| Local content | ENABLE_CONTENT_SYNC=false |
src/content/, src/data/, and public/images/ |
| External content repository | ENABLE_CONTENT_SYNC=true and CONTENT_REPO_URL=... |
A separate repository synchronized into the paths above |
One-Click Enable/Disable:
# Local content mode (recommended for getting started)
# Put this in .env to disable synchronization explicitly.
ENABLE_CONTENT_SYNC=false
pnpm dev
# External content repository mode
# 1. Copy the example configuration
cp .env.example .env
# 2. Edit .env
ENABLE_CONTENT_SYNC=true
CONTENT_REPO_URL=https://github.com/your-username/Mizuki-Content.git
# CONTENT_DIR=./content # Optional; this is the default
# 3. Synchronize content and start the site
pnpm run sync-content
pnpm devAn external repository uses this structure:
Mizuki-Content/
βββ posts/ # .md and .mdx posts
βββ spec/ # About, Friends, and other Markdown page content
βββ data/ # Structured page data such as projects or skills
βββ images/ # Public images, including albums and post assets
The sync script maps these directories to src/content/posts/, src/content/spec/, src/data/, and public/images/. src/data/ai-tools.ts is owned by the code repository and is preserved during synchronization.
Sync warning: When
ENABLE_CONTENT_SYNCis enabled,pnpm devandpnpm buildrun the sync hook automatically. IfCONTENT_DIRalready contains a Git repository, the script fetches and resets it to itsmainormasterremote branch. It can also back up existing runtime directories as.backup, create junctions or copies, and commit synchronized changes in the code repository. Commit or back up local content changes before running it, and do not edit synchronized target files directly.
For private repositories, use an SSH URL or configure credentials through the deployment platform. Never commit tokens in .env or put them in a public repository URL.
π Detailed Configuration: Content Separation Guide
π Migration Tutorial: Migrate from Single Repo to Separation Mode
π Deployment Guide: Deployment Guide
π Documentation Index: Documentation Index
Contributions are welcome! Feel free to submit issues and pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
This project is based on Fuwari, which is licensed under the MIT License. The original copyright notice and permission notice are included in the LICENSE.MIT file in accordance with the MIT License requirements.
Portions of the Markdown enhancements are adapted from Firefly under the MIT License. The original copyright and complete license text are retained in THIRD_PARTY_NOTICES.md.
- Based on the original Fuwari template
- Inspired by Yukina - a beautiful and elegant blog template
- Some designs are inspired by Firefly & Twilight templates
- Uses Pio to implement the adorable Live2D mascot plugin
- Built with Astro and Tailwind CSS
- Icons from Iconify
- Fuwari by saicaca - The original template that this project is based on. Thank you for creating such a beautiful and functional template.
- Yukina - Thanks for providing design inspiration and creativity that helped shape this project. Yukina is an elegant blog template that demonstrates excellent design principles and user experience.
- Firefly - Thanks for providing excellent layout design ideas. The dual sidebar layout, article dual-column grid layout, and some widget designs and implementations have enriched Mizuki's interface.
- Twilight - Thanks for providing inspiration and technical support. Twilight's dynamic wallpaper modes switching system, responsive design and transition effects have greatly enhanced the user experience of Mizuki.
Thanks to all contributors for their contributions to this project. If you have any questions or suggestions, please submit an Issue or Pull Request.
β If you find this project helpful, please consider giving it a star!







