AstroSvelte博客

shirone-theme — Astro 博客模板

作者 tyransol

Shirone 是一个基于 Astro 与 Svelte 的静态个人博客主题,采用 Material 3 Expressive 设计体系,面向长文写作与个人收藏类内容。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-09查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Material 3 Expressive 设计令牌的组件系统,支持动态 HCT 调色板与浅色/深色主题

02

Markdown 与 MDX 写作流程,支持数学公式、Mermaid、提示块、增强代码块与图片画廊

03

Swup 站内平滑导航,保持应用外壳持续存在,并支持路由进度与减少动态效果

04

内置 Pagefind 全文搜索、RSS 与站点地图输出

05

除文章外提供归档、分类、标签、友链、动态、番剧、相册、项目、技能与时间线等页面

06

可选功能遵循零负担规则,关闭时不产生额外请求、DOM、布局偏移或主包代码

模板详细介绍

Shirone 是一个静态个人博客主题,使用 Astro 与 Svelte 构建,并采用 Tailwind CSS 与 Stylus。它基于 Material 3 Expressive 规范建立了一套由设计令牌驱动的组件系统,配色使用动态 HCT 调色板,支持浅色与深色主题、横幅或纯色背景、可选纹理,以及访客自行调整显示偏好。

内容以 Markdown 或 MDX 撰写,支持数学公式、Mermaid 图表、提示块、增强代码块与图片画廊;站点提供 Pagefind 全文搜索、RSS 与站点地图输出。文章层面包含目录、相关文章、分享、加密与可选评论。除文章外,主题还提供归档、分类、标签、友链、动态、番剧、相册、项目、技能与时间线等独立页面。界面内置十种语言,交互支持键盘操作,并包含无障碍测试。

导航使用 Swup 实现站内平滑切换,保持应用外壳持续存在,并支持路由进度与减少动态效果偏好。可选功能遵循“零负担”规则:关闭时不产生额外外部请求、DOM、布局偏移或主包代码。主题源码、个人内容与 npm 发布被拆分为不同仓库,官方提供 Shirone-Content 用于双仓库内容分离模式,以及 Shirone-NPM 用于发布 shirones 包。

使用前需注意:运行环境要求 Node.js 22.12 或更新版本,包管理器为 pnpm 9.x(仓库固定 [email protected])。主题源码采用 MIT 许可,但演示图片、字体、图标等第三方素材需按各自许可单独核对;域名、托管等外部服务可能另行收费。

AstroSvelte博客

适合你的项目吗?

适用场景

  • 搭建以长文写作为主的个人博客
  • 整理个人收藏类内容,如番剧列表、相册、项目与时间线
  • 需要全文搜索、RSS 与站点地图的静态内容站点
  • 希望将主题源码与个人内容分离到不同仓库进行维护

适合人群

  • 使用 Astro 与 Svelte 技术栈的个人博客作者
  • 偏好 Markdown/MDX 写作流程并需要数学公式、图表与代码块增强的用户
  • 需要多语言界面与浅色/深色主题切换的站点
  • 希望将站点部署到 Vercel、Netlify、GitHub Pages 等静态托管服务的用户

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    运行环境需 Node.js 22.12 或更新版本,包管理器为 pnpm 9.x(仓库固定 [email protected])

  2. 2

    在 src/config/siteConfig.ts 中设置站点 URL、标题、语言、主题、横幅与显示选项

  3. 3

    在 src/config/profileConfig.ts 与 src/config/navBarConfig.ts 中更新个人资料与导航

  4. 4

    替换 src/content/、src/data/ 与 public/ 下的示例文章、个人数据与媒体文件

  5. 5

    部署前更新 site 与 base,并以 pnpm build 作为构建命令、dist 作为输出目录

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • 使用该主题需本地具备 Node.js 22.12 或更新版本,并使用 pnpm 9.x(仓库固定 [email protected])作为包管理器,环境不满足则无法安装与构建。
  • 在脚本执行受限的 Windows PowerShell 环境中,必须改用 pnpm.cmd 与 npx.cmd 执行命令,否则相关脚本无法运行。
  • 提交代码前必须运行 pnpm format 使用 Biome 格式化源文件,这是仓库强制的贡献流程要求。
  • 贡献代码时须在提交前用 pnpm format 格式化、保持每个 PR 聚焦,并采用 Conventional Commits 提交信息规范。
  • 若计划进行较大功能或视觉改动,需先开 issue 或 discussion 讨论,不能直接提交大型改动。
  • 部署前必须先在 src/config/siteConfig.ts 中更新 site 与 base 配置,否则站点路径与链接可能不正确。
  • 部署到静态托管服务时,构建命令须设为 pnpm build,输出目录须设为 dist。
  • 使用前需替换 src/content/、src/data/ 与 public/ 下的示例文章、个人数据与媒体文件,不能直接沿用示例内容。
  • 采用内容分离模式时,需将 Shirone-Content 仓库 fork 或克隆为自己的仓库(通常设为私有),再让主题仓库指向该内容仓库。
  • 普通博客用户应安装 shirones npm 包使用,而非直接在本主题源码仓库中工作。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

- [Node.js](https://nodejs.org/) 22.12 or newer - [pnpm](https://pnpm.io/) 9.x (the repository pins `[email protected]`)

README 原文

On Windows PowerShell installations where script execution is restricted, use `pnpm.cmd` and `npx.cmd` instead.

README 原文

| `pnpm format` | Format source files with Biome (mandatory before commit) |

README 原文

Always format your changes with `pnpm format` before committing, keep each pull request focused, and use Conventional Commits.

README 原文

For substantial features or visual changes, please open an issue or discussion first.

README 原文

Before deploying, update `site` and `base` in `src/config/siteConfig.ts`, then run:

README 原文

Use `pnpm build` as the build command and `dist` as the output directory.

README 原文

Replace the sample posts, personal data, and media under `src/content/`, `src/data/`, and `public/`.

README 原文

Fork or clone it into your own repository, normally private, then point this theme repository at it.

README 原文

regular blog users install `shirones` rather than working in this repository.

README 原文
https://github.com/tyransol/shirone-theme/blob/main/LICENSEhttps://github.com/tyransol/shirone-theme/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-09。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 85 / 100
技术栈
Astro · Svelte
网站类型
博客
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-10-09
截图检查日期
2026-10-09

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: [email protected] · 2026-10-09

查看当时使用的来源资料

SHA-256: 4b0efca9d31a532cd3c355749447c1793c7de5cb6e9a53e52fe49a594ff790df

2026-10-09T08:27:37.198Z

来源文件 / 仓库
<div align="center">

<img src="./public/logo/icon.webp" width="88" height="88" alt="Shirone logo" />

# Shirone

**An expressive, anime-inspired blog theme built on Material 3 Expressive.**

A calm reading space for long-form writing, personal collections, and the small details that make a site feel like yours.

[Live demo](https://shirone.mysqil.com/) · [Documentation](https://docs.shirone.mysqil.com/) · [Report an issue](https://github.com/LyraVoid/Shirone/issues)

[English](./README.md) · [简体中文](./README.zh-CN.md) · [繁體中文](./README.zh-TW.md) · [日本語](./README.ja.md)

![Node.js >= 22.12](https://img.shields.io/badge/Node.js-%3E%3D22.12-5FA04E?logo=nodedotjs&logoColor=white)
![pnpm 9](https://img.shields.io/badge/pnpm-9-F69220?logo=pnpm&logoColor=white)
![Astro 7](https://img.shields.io/badge/Astro-7-BC52EE?logo=astro&logoColor=white)
[![License: MIT](https://img.shields.io/badge/License-MIT-3DA639.svg)](./LICENSE)

</div>

> [!IMPORTANT]
> **Start with the [online documentation](https://docs.shirone.mysqil.com/).** It is the primary guide for setup, configuration, content workflows, and deployment.

## Start Here

The [online documentation](https://docs.shirone.mysqil.com/) is the main entry point for setup, configuration, content workflows, and deployment. This repository contains the theme source; use [Shirone-Content](https://github.com/LyraVoid/Shirone-Content) when you want to keep personal content in a separate repository.

## Verified In Practice

The current reference run scores 100 for Performance, Accessibility, Best Practices, and SEO, with all three agentic browsing checks passing. The detailed performance metrics also reach 100 in this run; results can vary with hosting, content, and network conditions.

![Shirone benchmark](./Benchmark.webp)

![Shirone homepage](./public/assets/projects/shirone.webp)

<table>
  <tr>
    <td align="center"><strong>Chromatic Spell</strong><br><sub>Dynamic HCT palettes that respond to light, mood, and choice.</sub></td>
    <td align="center"><strong>Seamless Passage</strong><br><sub>Swup navigation keeps the surrounding world gently in motion.</sub></td>
  </tr>
  <tr>
    <td align="center"><strong>Story Grimoire</strong><br><sub>Markdown, MDX, math, diagrams, code, and images in one writing flow.</sub></td>
    <td align="center"><strong>Quiet by Design</strong><br><sub>SSR-first, accessible, and truly weightless when features are disabled.</sub></td>
  </tr>
</table>

## ✦ A Small Spell for Every Story

Shirone is a static personal blog theme built with Astro 7, Svelte 5, Tailwind CSS 4, and Stylus. Its magic is not a layer of spectacle: it lives in colors that shift with light and mood, pages that turn without breaking the atmosphere, and small details that make a personal corner of the web feel alive.

Behind that softness is a token-driven Material 3 Expressive component system. Content is rendered server-side, while Swup provides smooth in-site navigation and keeps the surrounding application shell alive between pages.

The theme is designed for long-form writing as well as personal collections such as moments, albums, anime lists, friends, projects, skills, and timelines.

## ✦ Inside the Grimoire

- Dynamic HCT color palettes with Material 3 and Material 3 Expressive specifications
- Light and dark themes, banner and solid backgrounds, optional textures, and visitor display preferences
- Responsive layouts with configurable single or dual sidebars
- Smooth Swup navigation with a persistent shell, route progress, and reduced-motion support
- Markdown and MDX content with math, Mermaid, admonitions, enhanced code blocks, and image galleries
- Full-text search powered by Pagefind, plus RSS and sitemap output
- Article table of contents, related posts, sharing, encryption, and optional comments
- Dedicated pages for archives, categories, tags, friends, moments, anime, albums, projects, skills, and timelines
- Ten built-in interface locales
- SSR-first output, keyboard-friendly interactions, and accessibility testing
- Optional integrations follow a zero-burden rule: when disabled, they add no external requests, DOM, layout shift, or main-bundle code

## ✦ AI Skills

Shirone ships with [agent skills](./.agents/skills/README.md) in `.agents/skills/`. AI coding assistants that support the Agent Skills standard (Claude Code, Codex, ZCode, and others) discover them automatically after you clone the repository — developer-oriented skills guide theme development, while user-oriented skills help you write posts, use the custom Markdown syntaxes, and configure your site. To package the same skills as one installable Codex plugin, run `pnpm.cmd skills:package -- --zip`.

## Quick Start

### Requirements

- [Node.js](https://nodejs.org/) 22.12 or newer
- [pnpm](https://pnpm.io/) 9.x (the repository pins `[email protected]`)

### Run locally

```bash
git clone https://github.com/LyraVoid/Shirone.git
cd Shirone
corepack enable
pnpm install
pnpm dev
```

Open `http://localhost:4321` in your browser.

On Windows PowerShell installations where script execution is restricted, use `pnpm.cmd` and `npx.cmd` instead.

### Customize your site

1. Set the canonical URL, title, language, theme, banner, and display options in `src/config/siteConfig.ts`.
2. Update the profile and navigation in `src/config/profileConfig.ts` and `src/config/navBarConfig.ts`.
3. Review the feature-specific files in `src/config/`; their inline comments document defaults and supported values.
4. Replace the sample posts, personal data, and media under `src/content/`, `src/data/`, and `public/`.
5. Create a post with `pnpm new-post <filename>`, then edit it under `src/content/posts/`.

See [`src/config/README.md`](./src/config/README.md) for the complete configuration contract.

## Official Companion Repositories

Shirone keeps theme source, personal site content, and npm publishing responsibilities separate. These official repositories serve different workflows:

| Repository | Use it for | What it contains |
| --- | --- | --- |
| [Shirone-Content](https://github.com/LyraVoid/Shirone-Content) | Running a blog in the external-content, dual-repository mode | A content template for posts, moments, data, media, and `config/*.yaml` overlays. Fork or clone it into your own repository, normally private, then point this theme repository at it. See the [content-separation guide](./docs/content-separation/README.md). |
| [Shirone-NPM](https://github.com/LyraVoid/Shirone-NPM) | Maintaining and publishing the `shirones` npm package | The manual build-and-publish pipeline. It pulls this repository at build time and deliberately contains no theme source; regular blog users install `shirones` rather than working in this repository. See [npm package mode](./docs/npm-package-mode.md). |

## Main Configuration

| File | Purpose |
| --- | --- |
| `src/config/siteConfig.ts` | Site URL, identity, locale, dynamic color, banner, texture, TOC, and display settings |
| `src/config/profileConfig.ts` | Author profile and social links |
| `src/config/navBarConfig.ts` | Main navigation |
| `src/config/sidebarConfig.ts` | Sidebar layout, widgets, and page filters |
| `src/config/postListConfig.ts` | Pagination and list/grid presentation |
| `src/config/articleConfig.ts` | Update notice, related posts, and article sharing |
| `src/config/commentConfig.ts` | Optional comment provider |
| `src/config/musicConfig.ts` | Optional local, custom, Meting, or mixed music source |
| `src/config/animeConfig.ts` | Anime page and local/Bangumi/Bilibili snapshot source |

## Writing a Post

Posts live in `src/content/posts/` and may be Markdown or MDX. A minimal frontmatter block looks like this:

```yaml
---
title: My First Post
published: 2026-08-26
description: A short summary shown in post lists and metadata.
image: ./cover.webp
tags: [Astro, Notes]
category: Writing
draft: false
---
```

Frequently used optional fields include `updated`, `pinned`, `comment`, `lang`, `encrypted`, `password`, `passwordHint`, and `hideHomeContent`. Images may be remote URLs, absolute paths from `public/`, or paths relative to the post file.

## Commands

| Command | Action |
| --- | --- |
| `pnpm dev` | Start the development server |
| `pnpm new-post <filename>` | Create a new post |
| `pnpm format` | Format source files with Biome (mandatory before commit) |
| `pnpm check` | Run Astro diagnostics |
| `pnpm type-check` | Run TypeScript checks |
| `pnpm check:manifest` | Validate the component manifest |
| `pnpm test` | Run the Playwright test suite |
| `pnpm build` | Build the site and Pagefind index into `dist/` |
| `pnpm preview` | Preview the production build |
| `pnpm lighthouse` | Run the desktop production audit |

## Deployment

Shirone produces a static `dist/` directory and can be deployed to Vercel, Netlify, GitHub Pages, or any static hosting service.

Before deploying, update `site` and `base` in `src/config/siteConfig.ts`, then run:

```bash
pnpm install --frozen-lockfile
pnpm check
pnpm type-check
pnpm check:manifest
pnpm build
```

Use `pnpm build` as the build command and `dist` as the output directory. More details are available in [`INDEX.md`](./INDEX.md).

## Documentation

- [`src/config/README.md`](./src/config/README.md) - configuration reference
- [`docs/m3e-standard.md`](./docs/m3e-standard.md) - design tokens and component standard
- [`docs/atomic-structure.md`](./docs/atomic-structure.md) - component layers and dependency rules
- [`docs/markdown-extensions.md`](./docs/markdown-extensions.md) - Markdown plugin, styling, cache, and testing contracts
- [`docs/markdown-on-demand-loading.md`](./docs/markdown-on-demand-loading.md) - content-driven Markdown asset loading and Swup lifecycle
- [`docs/sidebar-system.md`](./docs/sidebar-system.md) - sidebar orchestration and Swup synchronization
- [`docs/on-demand-loading.md`](./docs/on-demand-loading.md) - zero-burden optional features
- [`docs/font-system.md`](./docs/font-system.md) - font configuration and production subsetting
- [`docs/npm-package-mode.md`](./docs/npm-package-mode.md) - how the theme also runs as an npm package, and the override system
- [`docs/packaging-contract.md`](./docs/packaging-contract.md) - rules new theme code must follow to keep working when installed from npm

## Contributing

Issues and pull requests are welcome. For substantial features or visual changes, please open an issue or discussion first. Read [`CONTRIBUTING.md`](./CONTRIBUTING.md) and the repository rules before submitting code. Always format your changes with `pnpm format` before committing, keep each pull request focused, and use Conventional Commits.

## Acknowledgements

Shirone began as a refactor of [Fuwari](https://github.com/saicaca/fuwari) by [saicaca](https://github.com/saicaca). Its current M3E design system, component architecture, page modules, and orchestration are developed as Shirone. Thanks to the Fuwari project and its contributors for the original foundation.

## Contributors

Every contribution adds a new line to Shirone's spellbook. Thank you to everyone who helps this little world grow.

<div align="center">
  <a href="https://github.com/LyraVoid/Shirone/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=LyraVoid/Shirone" alt="Shirone contributors" />
  </a>
</div>

## Star Trail

<div align="center">
  <a href="https://star-history.com/#LyraVoid/Shirone&amp;Date">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=LyraVoid/Shirone&amp;type=Date&amp;theme=dark" />
      <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=LyraVoid/Shirone&amp;type=Date" />
      <img alt="Shirone Star History chart" src="https://api.star-history.com/svg?repos=LyraVoid/Shirone&amp;type=Date" />
    </picture>
  </a>
  <p><sub>Each star is a spark that helps Shirone shine a little farther.</sub></p>
</div>

## License

Shirone is released under the [MIT License](./LICENSE). The repository retains the original copyright notice required by that license.
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。