Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darrenjennings/vuepress-plugin-reading-time
Vuepress reading time plugin to display how long a page takes to read
https://github.com/darrenjennings/vuepress-plugin-reading-time
Last synced: 3 months ago
JSON representation
Vuepress reading time plugin to display how long a page takes to read
- Host: GitHub
- URL: https://github.com/darrenjennings/vuepress-plugin-reading-time
- Owner: darrenjennings
- Created: 2019-01-04T20:14:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-02-05T03:38:04.000Z (over 5 years ago)
- Last Synced: 2024-03-01T19:02:12.172Z (4 months ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 32
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-stars - darrenjennings/vuepress-plugin-reading-time - Vuepress reading time plugin to display how long a page takes to read (JavaScript)
- awesome-stars - vuepress-plugin-reading-time
- awesome-vuepress - vuepress-plugin-reading-time - time plugin to display how long a page takes to read (Plugins / Community)
README
# vuepress-plugin-reading-time
> reading time plugin to display how long a post takes to read
[![Npm build badge](https://img.shields.io/npm/v/vuepress-plugin-reading-time.svg?style=flat-square)](https://www.npmjs.com/package/vuepress-plugin-reading-time)
```bash
yarn add -D vuepress-plugin-reading-time
# OR npm install -D vuepress-plugin-reading-time
```## Usage
```javascript
module.exports = {
plugins: ['vuepress-plugin-reading-time']
}
```Puts `reading-time` data into `$page` data so you can access like
```js
console.log($page.readingTime)
```Example output
```js
{
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`
- Default: ``Exclude pages by their path via a regular expression. This tests for both `path`
and `regularPath`.Example:
```javascript
plugins: [
['vuepress-plugin-reading-time', {
excludes: ['/about', '/tag/.*']
}]
]
```