Hexo显示文章字数与时长

安装npm 包:

1
npm install hexo-symbols-count-time

在博客根目录修改:_config.yml

1
2
3
4
5
6
7
8
9
symbols_count_time:
symbols: true
time: true
total_symbols: true
total_time: true
exclude_codeblock: false
awl: 4
wpm: 275
suffix: "mins."

在 Next 配置文件中 \source\_data\next.ymlconfig
(默认会添加,切记不能重复添加)

1
2
3
4
5
6
# Post wordcount display settings
# Dependencies: https://github.com/theme-next/hexo-symbols-count-time
symbols_count_time:
separated_meta: true
item_text_post: true
item_text_total: false

重新启动:

1
npx hexo s

参考:

Hexo博客NexT主题下添加字数统计和阅读时长

https://github.com/theme-next/hexo-symbols-count-time