200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > Hexo添加字数统计和阅读统计

Hexo添加字数统计和阅读统计

时间:2022-03-21 01:29:27

相关推荐

Hexo添加字数统计和阅读统计

Hexo博客添加字数统计和阅读统计

安装hexo-wordcount插件

npm i --save hexo-wordcount

成功会在根目录下的package.json中多出"hexo-wordcount": "^6.0.1"

安装hexo-symbols-count-time

$ npm install hexo-symbols-count-time --save

安装eslint

$ npm install eslint --save

在站点配置文件添加如下配置

symbols_count_time:symbols: true# 文章字数统计time: true # 文章阅读时长total_symbols: true# 站点总字数统计total_time: true # 站点总阅读时长exclude_codeblock: false# 排除代码字数统计

在主题配置文件中添加如下配置

symbols_count_time:separated_meta: true# 是否另起一行(true的话不和发表时间等同一行)item_text_post: true# 首页文章统计数量前是否显示文字描述(本文字数、阅读时长)item_text_total: false # 页面底部统计数量前是否显示文字描述(站点总字数、站点阅读时长)awl: 4 # Average Word Lengthwpm: 275 # Words Per Minute(每分钟阅读词数)suffix: mins.

Next主题添加字数统计和阅读统计

在主题配置文件做如下更改

post_wordcount: # 字数统计item_text: true# 是否显示文字wordcount: true# 显示字数min2read: true# 显示阅读时间totalcount: true# 显示总数separated_meta: true# 是否分开

大功告成啦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。