hexo 环境准备

hexo文档

1
2
3
4
5
npm init -y # 初始化npm
npm install -g hexo-cli # 可以使用全局
hexo init xhyblog
cd xhyblog
bun install #

Butterfly 安装依赖

Butterfly文档

1
2
3
4
# 安装 Butterfly 主题
# 在项目目录下运行以下命令,克隆 Butterfly 主题到 themes/butterfly 目录:
# /xhyblog 中 git clone
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly

Butterfly 主题依赖 Pug 和 Stylus 渲染器,需要安装以下插件:

1
bun add hexo-renderer-pug hexo-renderer-stylus --save

配置主题

打开 Hexo 的配置文件 _config.yml,将主题设置为 butterfly:

1
theme: butterfly

本地预览

在项目目录下运行以下命令,启动本地服务器:

1
hexo server

butterfly主题配置文档

1
bun add hexo-generator-search --save

音乐插件

音乐插件文档
对应github

1
bun add --save hexo-tag-aplayer