本文记录使用 Hexo + Butterfly 主题搭建个人博客的完整过程。
环境准备
安装 Node.js
安装 Hexo
初始化博客
1 2 3 4 5 6 7 8 9
| hexo init my-blog cd my-blog
npm install
hexo server
|
安装 Butterfly 主题
1
| npm install hexo-theme-butterfly
|
修改配置
在 _config.yml 中设置主题:
创建主题配置文件
创建 _config.butterfly.yml 覆盖主题默认配置。
常用命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| hexo new "文章标题"
hexo clean
hexo generate
hexo server
hexo deploy
|
文章 Front-matter
1 2 3 4 5 6 7 8 9 10 11
| --- title: 文章标题 date: 2025-01-05 tags: - 标签1 - 标签2 categories: - 分类名 cover: /images/cover.jpg top: 10 ---
|
总结
Hexo 是一个快速、简洁的博客框架,配合 Butterfly 主题可以快速搭建出美观的个人博客。