基于 Astro 构建的静态博客主题,灵感来自 hexo-theme-butterfly 与 HsuBlog
astro-astrofly — Astro 启动器模板
作者 mocusez
受 hexo-theme-butterfly 启发的 Astro 博客主题,支持中英双语、Pagefind 全文搜索、PWA 与 Waline 评论。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
内置中文与英文内容及按语言区分的路由
使用 Pagefind 提供静态全文搜索,支持多语言与移动端
支持 PWA 安装与离线访问,构建时自动更新缓存版本
集成 Waline 评论系统,含页面浏览量统计与深色模式
使用 Tailwind CSS 与明暗主题切换,自动生成 sitemap
模板详细介绍
Astrofly 是一个基于 Astro 的博客主题,作者说明其灵感来自 hexo-theme-butterfly 与 HsuBlog。仓库以 MIT 许可发布,可免费使用、修改、商用和分发该版本代码,分发时需保留版权与许可声明。
主题面向多语言博客:内置中文(zh-CN)与英文内容及按语言区分的路由,搜索由 Pagefind 提供并支持多语言,评论接入 Waline 并带页面浏览量统计与深色模式。此外包含 PWA 支持(可安装、离线访问、构建时自动缓存版本)、Shiki 语法高亮(含自定义 MLIR/LLVM 语法)、Tailwind CSS 样式与明暗主题切换、自动生成 sitemap,以及适配移动端的响应式布局。
使用方式有两种:克隆仓库后安装依赖,或通过 pnpm create astro 以该仓库为模板创建项目;两种方式都需要把 example_content 目录移动为 content 作为内容目录。仓库还提供 npm run newpage 生成文章、npm run sync 发布站点等脚本,并接受通过 Weblate 提交翻译。
限制方面:免费范围仅指该版本代码,演示图片、字体、图标等第三方素材需按各自许可核对;域名、托管等外部服务可能另行收费。README 中提到的 Astro 版本号未在依赖清单中核实,此处不作复述。
适合你的项目吗?
适用场景
- 搭建中英双语的个人博客或技术笔记站点
- 需要静态全文搜索且不依赖后端搜索服务的博客
- 希望通过 PWA 让读者安装并离线阅读的站点
- 使用 Waline 作为评论与浏览量统计方案的博客
适合人群
- 熟悉 Astro 与命令行构建流程的开发者
- 需要中英双语内容与语言路由的博客作者
- 希望以 MIT 许可免费使用并自行修改主题代码的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
克隆仓库后执行 pnpm install 与 pnpm approve-builds,并将 example_content 移动为 content
- 2
也可用 pnpm create astro@latest -- --template mocusez/astro-astrofly 以模板方式创建项目
- 3
开发服务器默认运行在 localhost:4321,构建输出到 ./dist/
- 4
评论、搜索等外部依赖需按各自文档单独配置,第三方素材需核对许可
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 评论功能依赖第三方 Waline 服务,需自行部署或接入 Waline 服务端并配置相应地址,属于外部服务依赖,非主题代码自带。
- 全文搜索由第三方 Pagefind 提供,构建时需运行 Pagefind 索引步骤,搜索能力依赖该外部工具。
- 翻译协作通过第三方平台 Weblate 进行,参与翻译需注册并使用该外部服务账号。
- 安装后需执行 pnpm approve-builds 批准依赖的构建脚本,否则部分依赖可能无法正常构建。
- 必须将 example_content 目录移动为 content 才能作为内容目录使用,否则站点内容缺失。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
- **Waline Comments** — Integrated [Waline](https://waline.js.org/) comment system with pageview counting and dark mode support
README 原文
- **Full-Text Search** — Lightning-fast static search powered by [Pagefind](https://pagefind.app/), with multilingual support and mobile optimization
README 原文
We welcome translation contributions via Weblate!
README 原文
pnpm approve-builds
README 原文
https://github.com/mocusez/astro-astrofly/blob/master/LICENSEhttps://github.com/mocusez/astro-astrofly/blob/master/README.mdmv example_content content # Use example content as your content directory
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-04。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- Astro Themes
- 资料与维护参考分
- 资料较完整 · 88 / 100
- 技术栈
- Astro · Hexo
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-15
- 截图检查日期
- 2026-10-04
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-04
查看当时使用的来源资料
SHA-256: f5de2922ef6c321838bff86586812f386c1128a41e5e0a44cc20575659bb95e5
2026-10-04T07:34:58.377Z
来源文件 / 仓库# Astrofly [](https://astro.build) English | [简体中文](./README_zh-CN.md) Inspire by the [hexo-theme-butterfly](https://github.com/jerryc127/hexo-theme-butterfly) and [HsuBlog](https://github.com/KraHsu/HsuBlog)  ## Features - **Astro v6** — Built on the latest Astro for fast, static-first performance - **Bilingual Support** — Chinese (zh-CN) and English content with language-specific routing - **Full-Text Search** — Lightning-fast static search powered by [Pagefind](https://pagefind.app/), with multilingual support and mobile optimization - **PWA Support** — Installable as a Progressive Web App with offline access, auto cache versioning on build - **Waline Comments** — Integrated [Waline](https://waline.js.org/) comment system with pageview counting and dark mode support - **Expressive Code** — Syntax highlighting powered by Shiki, with custom MLIR/LLVM grammar support - **Tailwind CSS** — Utility-first styling with dark/light theme toggle - **Sitemap** — Auto-generated sitemap for SEO - **Responsive Design** — Mobile-friendly layout with adaptive navigation ## 💻 Installation - Git ``` git clone https://github.com/mocusez/astro-astrofly.git blog cd blog pnpm install pnpm approve-builds mv example_content content # Use example content as your content directory ``` ### Use as template ``` pnpm create astro@latest -- --template mocusez/astro-astrofly mv example_content content # Use example content as your content directory ``` ## 🧞 Commands All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | | `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | `npm run astro -- --help` | Get help using the Astro CLI | | `npm run newpage` | Generate new post base on template | | `npm run sync` | Publish the site by system script | ## 🌍 Translation We welcome translation contributions via Weblate! [](https://hosted.weblate.org/projects/astro-astrofly/astro-astrofly/) Visit [Weblate](https://hosted.weblate.org/projects/astro-astrofly/astro-astrofly/) to help translate Astrofly into your language.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

astrowind
⭕️ AstroWind: A free template using Astro v7 and Tailwind CSS v4. Astro starter theme.
Astro · 博客
accessible-astro-starter
Accessible Astro Starter 是一个以无障碍为核心理念的 Astro 6 启动模板,由 incluud 团队维护。
Astro · 博客

astro-erudite
An opinionated, unstyled static blogging template built with Astro and native CSS.
Astro · 作品集

astro-shopify
astro-shopify 是一个面向开发者的轻量级电商启动模板,用于构建基于 Shopify 的无头店面。
Astro · 电商

brutal
A neobrutalism Astro starter theme
Astro · 启动器

qwind
⭕️ Qwind: A template to make your website using Qwik + Tailwind CSS.
Astro · 工具站
