主题安装


(npm安装):
1
npm i hexo-theme-anzhiyu

通过 npm 安装会在 node_modules 里生成


应用主题

打开 Hexo 根目录下的 config.yml, 找到以下配置项,把主题改为anzhiyu

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

安装 pug 和 stylus 渲染插件

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

无法安装可以使用cnpm进行安装

1
npm install hexo-renderer-pug hexo-renderer-stylus --save --registry=http://registry.npmmirror.com

本地启动 hexo

1
2
3
hexo cl
hexo g
hexo s

顶部图

如果不要显示顶部图,可直接配置 disable_top_img: true

顶部图的获取顺序,如果都没有配置,则不显示顶部图

字数统计

1
npm install hexo-wordcount --save or yarn add hexo-wordcount

修改 主题配置文件:

1
2
3
4
5
6
wordcount:
enable: true
post_wordcount: true
min2read: true
total_wordcount: true