@mr-hope/vuepress-plugin-reading-time
字数与阅读时间统计
阅读时间与字数统计
这个插件将会向 page 对象注入阅读时间与字数统计。
会自动向 page 对象注入 readingTime
:
interface ReadingTime {
/** 分钟数 */
minutes: number;
/** 字数 */
words: number;
}
1
2
3
4
5
6
2
3
4
5
6
# 使用插件
# 安装
npm i -D @mr-hope/vuepress-plugin-reading-time
1
或
yarn add -D @mr-hope/vuepress-plugin-reading-time
1
# 使用
// .vuepress/config.js
module.exports = {
plugins: [
[
"@mr-hope/reading-time",
{
// 你的选项
},
],
],
};
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 插件选项
# wordPerminute
- 类型:
number
- 默认值:
300
每分钟阅读字数