安装hexo

1
npm install -g hexo-cli

使用Butterfly主题

1
2
3
# npm install hexo
# npm install hexo-server
hexo init .

编辑_config.yml设置主题

1
theme: butterfly

npm方式

1
npm install hexo-theme-butterfly

git方式

1
2
3
git clone https://github.com/jerryc127/hexo-theme-butterfly themes/butterfly
npm install hexo-renderer-stylus
npm install hexo-renderer-pug

上传到github pages

1
npm install hexo-deployer-git

编辑_config.yml设置deploy, repo为你的github.io的地址

1
2
3
4
deploy:
type: git
repo: https://github.com/wurui1994/wurui1994.github.io
branch: gh-pages
1
hexo deploy

plugins

1
2
3
4
5
6
7
# word count
npm install hexo-wordcount
# local search
npm install hexo-generator-search
# aplayer
npm install aplayer
npm install hexo-tag-aplayer

misc

点击文章卡片跳转

1
.recent-post-item(onclick=`pjax.loadUrl("${article.link || article.path}")`)
1
cursor: pointer;