一.下载Buttlerfly使用
前提:Hexo的版本至少需要时5.0.0或者更高。更新有问题可以参考:Hexo 升级至 5.0 版
1.下载
本地博客根目录执行以下命令:
1 | git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly |
2.使用
修改站点配置文件_config.yml
,把主题改为butterfly
1 | theme: butterfly |
可能会遇到问题,请安装下面的插件:
1 | npm install hexo-renderer-pug hexo-renderer-stylus --save |
3.主题配置文件
把主题文件夹中的 _config.yml
复制到 Hexo 根目录,同时重新命名为_config.butterfly.yml
。以后只需要在_config.butterfly.yml
進行配置就行。
Hexo会自动合并主题中的_config.yml
和_config.butterfly.yml里的配置,如果存在同名配置,會使用
_config.butterfly.yml`的配置,其优先度较高。