vuepress-plugin-reading-time

Vuepress plugin to add reading-time functionality to page data
2,737 30
Install
npm install vuepress-plugin-reading-time
Latest Version:0.1.1
License:MIT
Last Updated:Feb 5, 2019
Links: GitHub  ·  npm
Maintainer: darrenjennings

vuepress-plugin-reading-time

reading time plugin to display how long a post takes to read

yarn add -D vuepress-plugin-reading-time
# OR npm install -D vuepress-plugin-reading-time

Usage

module.exports = {
  plugins: ['vuepress-plugin-reading-time']
}

Puts reading-time data into $page data so you can access like

console.log($page.readingTime)

Example output

{
  text: '1 min read',
  minutes: 0.08,
  time: 4800,
  words: 16
}

Overide

You can override by specifying a readingTime object in frontmatter

---
title: My great post!
date: "2018-08-13T17:36:55.338Z"
readingTime: { text: "Not so long!", minutes: 3 }
---

Some content here...

Options

excludes

  • Type: Array<string>
  • Default: ``

Exclude pages by their path via a regular expression. This tests for both path and regularPath.

Example:

plugins: [
  ['vuepress-plugin-reading-time', {
    excludes: ['/about', '/tag/.*']
  }]
]

Related Packages

@vuepress/client

Client package of VuePress

1,817,350 2,833
@mr-hope/vuepress-types

VuePress TypeScript helpers

22,182 2,536
vuepress-types

VuePress TypeScript helpers

8,406 82
vuepress-typings

VuePress TypeScript helpers

2,174 2,536
vuepress-theme-cool

A cool theme that has integrated some vue components, charts via charts, and mar...

1,336 60

Version History

Version Released License
0.1.1 MIT