Hexo + Butterfly 快速上手

158 字
1 分钟
Hexo + Butterfly 快速上手

本文记录如何快速搭建一个 Hexo 博客并应用 Butterfly 主题。

Note

本站已于 2026-10-03 从 Hexo + Butterfly 迁移到 Astro + Firefly。本文作为历史记录保留,内容仍适用于想使用 Hexo 的读者。

安装#

Terminal window
npm install -g hexo-cli
hexo init blog && cd blog
npm install hexo-theme-butterfly hexo-renderer-pug hexo-renderer-stylus --save

启用主题#

修改 _config.yml:

theme: butterfly

并把 node_modules/hexo-theme-butterfly/_config.yml 复制为根目录的 _config.butterfly.yml,之后所有主题配置都在这个文件修改,升级主题不会丢失。

常用命令#

命令说明
hexo new "标题"新建文章
hexo server本地预览
hexo generate生成静态文件
hexo clean清理缓存

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

Hexo + Butterfly 快速上手
https://gsxbxsg.github.io/posts/hexo-butterfly-guide/
作者
ELEC
发布于
2026-10-02
许可协议
CC BY-NC-SA 4.0
Profile Image of the Author
ELEC
Stay hungry, stay foolish.
公告
欢迎来到我的博客!本站已从 Hexo 迁移至 Astro + Firefly。
分类
标签
站点统计
文章
10
分类
3
标签
21
总字数
35,546
运行时长
0 天
最后活动
0 天前
站点信息
构建平台
GitHub Actions
博客版本
Firefly v6.16.8
文章许可
CC BY-NC-SA 4.0
文章目录