Hexo安装butterfly主题

安装

在终端中进入hexo根目录,比如:

1
cd /Users/...

输入以下内容,并回车

1
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly

安装需要的插件等等

1
npm install hexo-renderer-pug hexo-renderer-stylus --save

配置

修改Hexo根目录下_config.yml文件里theme设置,保存

1
theme: butterfly

去到butterfly主题目录下,将butterfly的_config.yml文件复制到Hexo根目录,并改名为_config.butterfly.yml

备注:是因为Hexo会自动合并butterfly主题目录下_config.yml文件和根目录下_config.butterfly.yml的配置,如果存在同名配置,会优先使用_config.butterfly.yml的。

后续修改配置只需要在根目录下_config.butterfly.yml里更改即可。

CleanShot 2023-05-13 at 12.37.00@2x


本文摘录自Butterfly官方文档,或有删改