Hexo - Next 加入字数统计
一、安装
- 安装Npm包:
npm install hexo-word-counter - 一键三联:
hexo cleanhexo ghexo server||hexo deploy
二、配置
- 在 Hexo主题配置文件
_config中配置如下:根据自己需要进行修改(官方设置在Hexo根目录添加配置,但是实验之后会发现失效情况,时间会显示NaN:aN)
awl– Average Word Length (chars count in word). Default:4. You can check this here.- CN ≈
2 - EN ≈
5 - RU ≈
6
- CN ≈
wpm– Words Per Minute. Default:275. You can check this here.- Slow ≈
200 - Normal ≈
275 - Fast ≈
350
- Slow ≈
Note for Chinese users: because in Chinese language average word length about
~1.5and if you at most cases write posts in Chinese (without mixed English), recommended to setawlto2andwpmto300.
# 文章字数统计设置 Post wordcount display settings |
item_text_total:效果如下
最终效果:

本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Bai's Blog!
