Butterfly 安装
安装
稳定版【建议】
在你的 Hexo 根目录里
1 | git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly |
测试版
测试版可能存在 bug,追求稳定的请安装稳定版
如果想要安装比较新的 dev 分支,可以
1 | git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly |
升级方法:在主题目录下,运行 git pull
稳定版【建议】
在你的 Hexo 根目录里
1 | git clone -b master https://gitee.com/immyw/hexo-theme-butterfly.git themes/butterfly |
测试版
测试版可能存在 Bugs,追求稳定的请安装稳定版
如果想要安装比较新的 dev 分支,可以
1 | git clone -b dev https://gitee.com/immyw/hexo-theme-butterfly.git themes/butterfly |
升级方法:在主题目录下,运行git pull
此方法只支持 Hexo 5.0.0 以上版本
通过 npm 安装并不会在 themes 里生成主题文件夹,而是在 node_modules 里生成
在你的 Hexo 根目录里
1 | npm i hexo-theme-butterfly |
升级方法:在 Hexo 根目录下,运行 npm update hexo-theme-butterfly
应用主题
修改 Hexo 根目录下的 _config.yml,把主题改为butterfly
1 | theme: butterfly |
安装插件
如果你没有 pug 以及 stylus 的渲染器,请下载安装:
1 | npm install hexo-renderer-pug hexo-renderer-stylus --save |
升级建议
升级完成后,请到 Github 的 Releases 界面 或者 文档七 查看新版的更新内容。
里面有标注 _config 文件的变更内容(如有),请根据实际情况更新你的配置内容。
为了减少升级主题后带来的不便,请使用以下方法(建议,可以不做)。
在 hexo 的根目录创建一个文件 _config.butterfly.yml,并把主题目录的 _config.yml 内容复製到 _config.butterfly.yml 去。( 注意: 复製的是主题的 _config.yml , 而不是 hexo 的 _config.yml)
注意: 不要把主题目录的
_config.yml删掉
注意: 以后只需要在
_config.butterfly.yml进行配置就行。
如果使用了_config.butterfly.yml, 配置主题的_config.yml将不会有效果。
Hexo 会自动合併主题中的_config.yml和 _config.butterfly.yml里的配置,如果存在同名配置,会使用_config.butterfly.yml的配置,其优先度较高。






