cosZone/astro-koharu
About
An Astro theme blog with a cute, anime-inspired aesthetic and a pink-and-blue color palette. Inspired by Hexo’s Shoka theme, it adds many personal touches and offers excellent performance.
Web & App DevelopmentMeasured star growth
- in 24h
- +1
- in 7 days
- +7
- in 15 days
- +18
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
docs/README.en.md
Originalastro-koharu

A cute / anime-style / pink-blue themed blog, perfect for ACG, frontend dev, and journaling personal sites with excellent performance.
The name is inspired by "Koharu-biyori" (こはるびより), which refers to the period from late autumn to early winter when there's a stretch of warm, spring-like sunny days — known as "Indian summer" in English.
The overall design is inspired by the Hexo Shoka theme, rebuilt with a modern tech stack for your personal blog.
This repository has been cleaned up as a demo repository. Visit the theme developer's blog at https://blog.cosine.ren/ — give it a star if you like it!
Getting started · Full guide · Feedback
License: AGPL-3.0. Read LICENSE before using, modifying, or deploying the theme.
Under active development
- Built on Astro, static output, fast loading
- Cute / anime-style / pink-blue color scheme, ideal for ACG, frontend, and journaling sites
- Multi-category and multi-tag support without forcing complex information architecture
- Minimal performance overhead
- Serverless full-site search powered by Pagefind
- LQIP (Low Quality Image Placeholders) — gradient placeholders shown before images load
A look around
Recorded on this repository’s demo site (Chinese UI).
![]() Sakura petals drift over the cover; the header floats as a capsule once you scroll |
![]() A circular reveal into the night-sakura dark theme |
![]() Petal bursts, a gliding nav pill and smooth transitions across archives, categories, friends and series |
![]() A silk-thread table of contents follows your reading |
![]() The writing room previews as you type |
![]() A mobile drawer you can drag to close |
What you can do
| Use case | Features and guides |
|---|---|
| Write posts | Writing room: Markdown source and live blog preview, searchable syntax handbook, post properties, browser drafts, import and export; the local CMS uses the same editor to save files |
| Write rich Markdown | GFM, syntax highlighting, math, Mermaid, Infographic, link cards; toggleable Shoka admonitions, collapsible blocks, tabs, text effects, spoilers, ruby, quizzes, and media; see the syntax guide |
| Mark and share posts | Colophon marks for authorship, spoilers, and outdated content, with archive filtering; post actions to copy, download, or import full Markdown into the writing room |
| Organize content | Nested categories, tags, archives, drafts, pinned posts; featured series with dedicated pages and homepage highlights; custom pages under src/pages/ |
| Read comfortably | Light/dark themes, mobile section header and TOC, reading progress and time; Pagefind search, LQIP image placeholders; three motion levels and sakura effects that respect reduced-motion preferences |
| Publish in multiple languages | Chinese, English, Japanese, and Korean UI dictionaries; content translations, language switcher, hreflang, and locale-specific RSS; see i18n setup |
| Connect with readers | Waline / Giscus / Remark42 / Twikoo comments, friend-link groups, announcements, and Umami; optional BGM, Bangumi collections, and Christmas effects |
| Generate content assets | Koharu CLI for creation, backup, restore, updates, and migration; optional LQIP, semantic recommendations, and AI summaries |
| Extend your blog | AES-256-GCM encryption for posts or blocks; optional Moments from public koharu-suite channels, with detail pages, search, pagination, and RSS |
Writing and managing posts
After installation, create your first post from the repository root:
pnpm koharu new post
Follow the prompts for a title, category, and tags. The file goes into src/content/blog/. You can also create a Markdown file directly:
---
title: My first post
date: 2026-10-09
link: hello-koharu
tags: [Life]
---
A place to keep the things I want to remember.
With pnpm dev running, open http://localhost:4321/post/hello-koharu.
To write in your browser, ensure editor.enabled: true in config/site.yaml, restart the dev server, and open http://localhost:4321/editor/. The public writing room keeps drafts in the current browser. To save to blog files, run this in another terminal:
pnpm cms
Open http://localhost:4322, select a post in the CMS, and edit and save it in the same writing room. See the writing room guide for the public editor and local CMS boundaries.
Local setup
Requires Node.js ≥ 22.20.0 and pnpm 10.28.2; package.json is the source of truth.
git clone https://github.com/cosZone/astro-koharu.git
cd astro-koharu
pnpm install
pnpm dev
Open http://localhost:4321. The root workspace installs site and CMS dependencies with one lockfile. For the site alone, use pnpm --filter astro-koharu install; for the CMS alone, use pnpm cms:install.
Edit config/site.yaml to set your site name, author, domain, avatar, and navigation, then replace the example posts. Restart the dev server or rebuild after configuration changes. Follow getting started for the steps.
Deployment
pnpm build
pnpm preview
| Mode | Deployment | Requirements |
|---|---|---|
| Static blog (default) | Publish dist/ on Vercel, Netlify, or a static file server; Docker uses nginx |
No blog backend |
| Moments (optional) | Astro Node standalone; Docker uses pnpm docker:up:dynamic |
moments.enabled: true, a public KOHARU_SUITE_URL, and a running koharu-suite service |
Default Docker deployment:
cp .env.example .env
pnpm docker:up
See the deployment guide for static/dynamic modes, ports, environment variables, and rebuilds. The writing room can be hosted statically. Vercel includes a link-preview fetch function; other static hosts need a separate link-preview service to fetch new link cards.
Configuration and documentation
| What to configure | Reference |
|---|---|
| Site details, navigation, comments, music, motion, and optional features | Site configuration and full guide |
| Translated category, series, and colophon labels | Content translations; translated posts go in src/content/blog/<locale>/ |
| Writing room, post properties, and CMS source-file saving | Writing room guide |
| Backup, restore, updates, legacy link migration, and asset generation | Koharu CLI guide |
| Moments channels and dynamic deployment | Moments guide and deployment guide |
| Contributing to the theme | Contributing guide |
Most configuration and development guides are currently in Chinese; Moments also has English and Japanese guides.
Before you start
- Upgrading old content: Legacy
slugfields must migrate tolink. After the update process exits, runpnpm koharu migrate --dry-runandpnpm koharu migratebefore starting or building; see migration details. - Writing room and CMS: The public editor does not publish to your repository. Download drafts for backup; the local CMS manages files on your machine. The writing room UI and handbook are currently in Chinese, and images are inserted by URL.
- Source and encryption: When post actions are enabled, public Markdown includes frontmatter. Encrypted posts and posts with encrypted blocks do not expose source files. AES-256-GCM uses passwords at build time for encryption without shipping them to the client; readers enter passwords themselves.
- External services: Comments, music APIs, Bangumi, Umami, and link fetching depend on their respective services. AI summaries and semantic vectors are optional generation steps.
- Performance: The screenshots below are historical examples. Results depend on content, configuration, and hosting; measure your own site.
Interface preview
The original demo images are preserved below; some predate the current release.

Excellent Performance: Aiming for all-green on desktop, though continuous checking is needed as features evolve!

Issues are welcome — but since this is a personal project, feel free to fork and customize!

Feature Showcase
- Gradient placeholders before images load for better visual experience - Blog Post

- Smooth dark mode transition animation powered by View Transitions API

- Markdown enhancement - Link embed feature - Example

- Markdown enhancement - Create beautiful infographics with @antv/infographic
Infographic Guide

- Styled RSS feed page - Example

- Announcement system
- Shoka-compatible Markdown syntax - Admonition blocks, collapsible blocks, tab cards, text effects, spoiler text, ruby annotations, quizzes, and more
- Audio/video player - Supports music playlists and video playback through Meting; self-hosting the API is recommended
Blogs Using This Theme
Inspired by Zhilu's Blog, here's a showcase of blogs using this theme.
Join QQ group 598022684 for discussion, or chat in the comments of my frontend channel.
| Blog | Author | Repository | Notes |
|---|---|---|---|
| Cosine's Blog | cosine | cosZone/astro-koharu | This theme |
| XueHua's Blog | XueHua-s | XueHua-s/astro-snow | Simplified features, added a start page |
| Ksable's Blog | Ksable | God-2077/astro-blog | Modified / added some features |
Acknowledgements
Font used: Chill Round
Thanks to the following projects for providing inspiration and reference for astro-koharu:
Star History
License
Explore related projects
Loading…





