aoi学院

Aisaka's Blog, School of Aoi, Aisaka University

Hexo-利用插件实现字符统计及阅读时长估计

统计文章中的字符,根据字数估算阅读时间,这个功能是通过插件hexo-wordcount来实现的。

  1. 安装插件
1
npm install hexo-wordcount --save
  1. 打开主题配置文件进行配置
1
2
3
4
5
6
7
8
# Post wordcount display settings
# Dependencies: https://github.com/willin/hexo-wordcount
post_wordcount:
item_text: true # 是否显示“字数统计”及“阅读分钟”的文字
wordcount: true # 是否显示字数统计
min2read: true # 是否显示估算阅读分钟
totalcount: true # 是否在网站底部显示所有文章字数之和
separated_meta: true

效果如图: