https://github.com/jerryc127/hexo-theme-butterfly 下载源码zip,放入Hexo目录下的themes文件夹,改名为butterfly。

修改Hexo目录下的_config.yml

1
2
3
4
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: Butterfly

把原来的theme的值从landscape改成Butterfly

在Hexo目录下运行命令hexo g输出,控制台先如下输出

1
2
3
4
5
6
7
8
9
===================================================================
##### # # ##### ##### ###### ##### ###### # # #
# # # # # # # # # # # # #
##### # # # # ##### # # ##### # #
# # # # # # # ##### # # #
# # # # # # # # # # # #
##### #### # # ###### # # # ###### #
5.0.0
===================================================================

再运行hexo server启动服务,访问 http://localhost:4000/ ,页面显示extends includes/layout.pug block content include ./includes/mixins/indexPostUI.pug +indexPostUI 。 需要安装运行npm install hexo-renderer-pug hexo-renderer-stylus --save (这一个操作会很慢)。

安装主题后的页面

对比默认的主题

除了样式上的美化,Butterfly主题附加了很多功能,快速分享,浏览次数统计,评论功能等等。