字数统计
使用hexo-word-counter统计文章的字数以及预期阅读时间。完成配置后,可以在每篇文章开头和页面底部显示字数和阅读时间
安装
$ npm install hexo-word-counter
$ hexo clean
配置
Hexo _config.yml
在文件尾部添加
symbols_count_time:
symbols: true
time: true
total_symbols: true
total_time: true
exclude_codeblock: false
awl: 4
wpm: 275
suffix: "mins."
NexT _config.yml
修改
# Post wordcount display settings
# Dependencies: https://github.com/next-theme/hexo-word-counter
symbols_count_time:
separated_meta: true
item_text_total: false
设置item_text_total
为true
参数
awl
– 平均字节长度(Average Word Length
)。默认为4
CN ≈ 2
EN ≈ 5
RU ≈ 6
wpm
– 每分钟阅读字数(Words Per Minute
)。默认为275Slow ≈ 200
Normal ≈ 275
Fast ≈ 350
如果文章中大多中文,那么设置awl
为2
,wpm
为300
比较合适