在Hexo主题配置中,发现直接把wordcount改为true并不能使用字数统计的功能
查阅后发现需要安装字数统计的插件。
打开Terminal,进入blog文件夹,输入:

1
npm install hexo-wordcount --save

然后在主题配置文件 _config.yml 中进行以下配置:

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