支持 Markdown 与 MDX 写作,内置 41 个内容组件、Shiki 语法高亮和 KaTeX 数学渲染
astro-solitude — Astro 博客模板
作者 everfu
Astro Solitude 是一个基于 Astro 的静态博客主题,支持 Markdown/MDX 写作、41 个内容组件、分类标签系列归档、多种评论系统与本地搜索,界面默认英文并提供简繁中文和西班牙语翻译。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
文章管理涵盖分类、标签、系列、归档、分页、置顶、草稿、自定义 URL 与别名
提供关于、友链、装备、音乐、留言板、短文、最近评论和 404 等页面
支持本地搜索、Algolia、DocSearch,并生成 RSS 与站点地图
可接入 Twikoo、Waline、Valine、Artalk、Giscus 评论系统,按配置加载
界面默认英文,内置简体中文、繁体中文和西班牙语翻译
模板详细介绍
Astro Solitude 是 everfu 为 Astro 开发的静态博客主题,采用 Apache-2.0 许可。它面向个人博客场景,通过 Astro 生成静态页面,可部署到托管平台或自有服务器。
写作方面,主题支持 Markdown 与 MDX,内置 41 个内容组件、Shiki 语法高亮和 KaTeX 数学渲染。文章管理提供分类、标签、系列、归档、分页、置顶、草稿、自定义 URL 与别名。除常规文章外,还包含关于、友链、装备、音乐、留言板、短文、最近评论和 404 等页面。
交互上提供明暗模式、图片灯箱、键盘快捷键、右键菜单,以及跨页面导航持续播放的音乐胶囊。搜索支持本地搜索、Algolia 和 DocSearch,并生成 RSS 与站点地图。评论可接入 Twikoo、Waline、Valine、Artalk 和 Giscus,按配置加载。界面默认英文,内置简体中文、繁体中文和西班牙语翻译。
使用前需注意:模板自带示例文章与页面,评论、评论聚合和在线音乐默认关闭,需要按集成指南填入自己的服务标识。更换界面语言不会翻译文章或自定义导航。站点托管在子目录时需设置 base。示例图片、字体、图标等第三方素材需单独核对其许可。
适合你的项目吗?
适用场景
- 使用 Astro 搭建个人静态博客并部署到托管平台或自有服务器
- 以 Markdown 或 MDX 撰写技术文章、笔记和短文,并用分类、标签、系列组织内容
- 需要本地搜索、RSS 订阅和站点地图的博客站点
- 希望接入 Twikoo、Waline、Valine、Artalk 或 Giscus 等评论服务的博客
- 需要明暗模式、图片灯箱、键盘快捷键和跨页音乐播放等阅读交互的站点
适合人群
- 熟悉 Astro 或愿意按文档配置 site.config.ts 的开发者
- 以静态部署为主、不需要服务端渲染的个人博客作者
- 需要多语言界面(英文、简繁中文、西班牙语)的博客站点
- 希望使用 MDX 组件和数学公式渲染来写作的技术博主
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
需要 Node.js 22.12.0+ 和 pnpm,pnpm 版本以 package.json 的 packageManager 字段为准
- 2
通过 GitHub 的 Use this template 创建独立仓库后克隆,执行 pnpm install --frozen-lockfile 和 pnpm dev
- 3
编辑 src/site.config.ts 设置站点 URL、标题、作者、导航和主题选项,子目录部署需设置 base
- 4
模板自带示例文章与页面,发布前需替换示例内容、图片和站点身份信息
- 5
评论、评论聚合和在线音乐默认关闭,需按集成指南填入自己的服务标识
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 Apache-2.0 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发;分发时需随附 Apache-2.0 许可证。
- 修改过的文件需显著标明改动,并保留相关版权、专利、商标及归属声明。
- 若原项目附有 NOTICE 文件,分发衍生作品时需保留其中适用的归属声明。
- 许可包含适用的贡献者专利授权;发起许可所述专利诉讼会终止该专利授权,且不授予商标使用权。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 评论、评论聚合与在线音乐功能默认关闭,需自行按集成指南配置第三方服务标识(如 Twikoo、Waline、Valine、Artalk、Giscus 等)才能启用,可能涉及外部服务账号或费用。
- 发布前必须替换模板自带的示例文章、图片和站点身份信息,不能直接以示例内容上线。
- 切换界面语言仅影响内置界面文案,不会翻译文章内容或自定义导航。
- 若站点部署在子目录下,必须额外设置 base 配置项,否则路径会出错。
- 运行环境要求 Node.js 22.12.0 及以上并使用 pnpm,且 pnpm 版本须符合 package.json 中 packageManager 字段的指定。
- 修改或再分发项目时须保留适用的许可证与版权声明。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 Apache-2.0 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
no-charge, royalty-free, irrevocable copyright license
许可证原文
Comments, comment aggregation, and online music are disabled with empty service identifiers. Follow the [integration guide](docs/integrations.md) to connect your own services.
README 原文
Replace sample content, images, and site identity before publishing.
README 原文
Changing the interface locale does not translate posts or custom navigation.
README 原文
For a site hosted under a subdirectory, also set `base`, for example `base: '/blog/'`.
README 原文
Install Node.js **22.12.0+** and pnpm. Use the pnpm version specified in the `packageManager` field of [package.json](package.json).
README 原文
https://github.com/everfu/astro-solitude/blob/main/LICENSEhttps://github.com/everfu/astro-solitude/blob/main/README.mdRetain the applicable license and copyright notices when modifying or redistributing the project.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- Astro Themes
- 资料与维护参考分
- 资料较完整 · 83 / 100
- 技术栈
- Astro
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-14
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 7d9dfc4e1eceb048153aa6616827aaa86af8dd7701459b65da62b777c12adb59
2026-10-02T09:04:22.685Z
来源文件 / 仓库English 丨 [简体中文](README.zh-CN.md)
<div align="center">
<img src="public/img/logo.png" width="120" height="120" alt="Astro Solitude paper airplane logo" />
# Astro Solitude
A clean, elegant, feature-rich blog theme for Astro.
Build your personal blog with static pages, Markdown / MDX, light and dark modes, and a rich collection of content components.
[](https://astro.build/)
[](package.json)
[](LICENSE)
[](https://github.com/everfu/astro-solitude/actions/workflows/check.yml)
[](https://github.com/everfu/astro-solitude/stargazers)
[Use this template](https://github.com/everfu/astro-solitude/generate) · [Documentation](docs/README.md) · [Quick start](#quick-start) · [Configuration](docs/configuration.md) · [Components](docs/components.md) · [Deployment](docs/deployment.md) · [Report an issue](https://github.com/everfu/astro-solitude/issues)
</div>

## Features
- **Layout and reading**: responsive post cards, recommendations, sidebar, table of contents, related posts, copyright notices, and donation links.
- **Writing**: Markdown / MDX, 41 content components, Shiki syntax highlighting, and KaTeX math rendering.
- **Post management**: categories, tags, series, archives, pagination, pinned posts, drafts, custom URLs, and aliases.
- **Special pages**: About, Links, Equipment, Music, Message Board, short posts, Recent Comments, and 404.
- **Interactions**: light and dark modes, image lightbox, keyboard shortcuts, context menu, and a music capsule that persists across page navigation.
- **Search and feeds**: local search, Algolia, DocSearch, RSS, and sitemap.
- **Comments**: Twikoo, Waline, Valine, Artalk, and Giscus, loaded according to configuration.
- **Interface languages**: English by default, with Simplified Chinese, Traditional Chinese, and Spanish.
- **Static deployment**: generate static files for a hosting platform or your own server.
## Quick start
### 1. Get the project
Install Node.js **22.12.0+** and pnpm. Use the pnpm version specified in the `packageManager` field of [package.json](package.json).
Click [Use this template](https://github.com/everfu/astro-solitude/generate) to create an independent repository, then clone your copy (replace `YOUR_NAME` and `my-blog`):
```sh
git clone https://github.com/YOUR_NAME/my-blog.git
cd my-blog
pnpm install --frozen-lockfile
pnpm dev
```
Open the local URL shown in your terminal to preview the theme and sample content.
### 2. Configure your site
Edit [`src/site.config.ts`](src/site.config.ts) to set your site URL, title, author, navigation, and theme options. Here is a minimal configuration:
```ts
import { defineSolitudeConfig } from './lib/config';
export default defineSolitudeConfig({
site: 'https://example.com',
title: 'My blog',
description: 'Notes, stories, and discoveries.',
locale: 'en',
author: { name: 'Your name' },
});
```
For a site hosted under a subdirectory, also set `base`, for example `base: '/blog/'`. See [Configuration](docs/configuration.md) for all options.
The template includes sample posts and pages with local search enabled. Comments, comment aggregation, and online music are disabled with empty service identifiers. Follow the [integration guide](docs/integrations.md) to connect your own services. Replace sample content, images, and site identity before publishing. Changing the interface locale does not translate posts or custom navigation.
### 3. Start writing
Create a Markdown or MDX file in `src/content/posts/`, such as `hello-world.md`:
```md
---
title: Hello, world
date: 2026-09-11
description: My first post.
tags: [Life]
---
Start your story here.
```
The default URL is `/p/hello-world/`. Use `slug`, `url`, and `aliases` to customize addresses. Set `draft: true` for drafts, or `home: false` to hide a post from homepage areas while keeping it in archives, search, RSS, and direct links.
See [Front matter](docs/writing.md#front-matter) and [MDX components](docs/components.md) for more writing options.
### 4. Build and deploy
```sh
pnpm build
pnpm preview
```
Publish the generated `dist/` directory to your hosting platform. Set the build command to `pnpm build` and the output directory to `dist`. Use `pnpm install --frozen-lockfile` during dependency installation.
See [Deployment](docs/deployment.md) for hosting instructions and path configuration.
## Documentation
The template, sample content, and documentation use English by default. Built-in interface translations are available in Simplified Chinese, Traditional Chinese, and Spanish. Start with the [documentation index](docs/README.md).
| Guide | Contents |
| ------------------------------------------ | --------------------------------------------------------- |
| [Getting started](docs/getting-started.md) | Create a template copy, install, write your first post |
| [Configuration](docs/configuration.md) | Site identity, appearance, navigation, defaults |
| [Writing](docs/writing.md) | Front matter, drafts, categories, URLs, feeds |
| [Pages](docs/pages.md) | About, links, equipment, short updates |
| [Components](docs/components.md) | Usage, parameters, and examples for all 41 MDX components |
| [Integrations](docs/integrations.md) | Comments, music, external search |
| [Deployment](docs/deployment.md) | GitHub Pages, static hosts, subpaths |
| [Hugo import](docs/migration.md) | Preview, export, verify migrated content |
| [FAQ](docs/faq.md) | Troubleshooting and theme updates |
<details>
<summary>More previews: dark mode and mobile reading</summary>


</details>
## Project structure
```text
astro-solitude/
├── public/ # Images, fonts, and other static assets
├── src/
│ ├── components/ # Theme and MDX components
│ ├── content/
│ │ ├── posts/ # Blog posts
│ │ └── pages/ # Custom pages
│ ├── data/ # About, links, equipment, and short-post data
│ ├── layouts/ # Page layouts
│ ├── pages/ # Astro routes
│ ├── styles/custom.css # Custom styles
│ └── site.config.ts # Site configuration
├── docs/ # Documentation
└── astro.config.mjs # Astro configuration
```
## Contributing
Use [Issues](https://github.com/everfu/astro-solitude/issues) for bug reports and suggestions. [Pull requests](https://github.com/everfu/astro-solitude/pulls) improving the theme, documentation, and translations are welcome. Include reproduction steps, your environment, and relevant configuration when reporting a problem.
Run these checks before submitting changes:
```sh
pnpm docs:check
pnpm check
pnpm build
pnpm test
```
For changes to page interactions, also run the browser tests:
```sh
pnpm build:fixture
pnpm exec playwright install chromium
pnpm test:e2e
```
Browser tests use an isolated fixture site. Mocked third-party tests do not establish that live services work. See the [development validation report](docs/parity.md) for test coverage and source comparisons.
## License
[Apache-2.0](LICENSE) License © 2026–present [everfu](https://github.com/everfu). Retain the applicable license and copyright notices when modifying or redistributing the project.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

astrowind
⭕️ AstroWind: A free template using Astro v7 and Tailwind CSS v4. Astro starter theme.
Astro · 博客

astro-paper
A minimal, accessible and SEO-friendly Astro blog theme.
Astro · 博客

fuwari
✨A static blog template built with Astro.
Astro · 博客

Firefly
Firefly 是一款基于 Astro 的静态博客主题,由 CuteLeaf 在 saicaca 的 Fuwari 模板基础上二次开发,主打清新美观的视觉风格。
Astro · 博客

astro-theme-cactus
A simple Astro theme. Use it to create your blog or website.
Astro · 作品集

astrofy
Astrofy is a free and open-source template for your Personal Portfolio Website built with Astro and TailwindCS…
Astro · 作品集
