ulka-plugin-reading-time

1.1.5 • Public • Published

ulka-plugin-reading-time

Adds a medium-like reading time estimate to your ulka posts. Powered by reading time.

Installation

npm install ulka-plugin-reading-time

Add ulka-plugin-reading-time to plugins array in ulka-config.js

// ulka-config.js
module.exports = {
    ...
    plugins: [
    ...
    "ulka-plugin-reading-time",
    ],
}

Usage

After the setup, readingTime key will be available in fields.

// values.fields.readingTime
{
    text: '1 min read',
    minutes: 1,
    time: 60000,
    words: 200
}

Customization

To customize ulka-plugin-reading-time, you need to pass plugin as object to plugins array.

// ulka-config.js
module.exports = {
    ...
    plugins: [
        ...
        {
            resolve: "ulka-plugin-reading-time",
            options: {
                // options accepted by reading-time (https://github.com/ngryman/reading-time)
            }
        },
    ],
}

Readme

Keywords

none

Package Sidebar

Install

npm i ulka-plugin-reading-time

Weekly Downloads

0

Version

1.1.5

License

MIT

Unpacked Size

3.14 kB

Total Files

4

Last publish

Collaborators

  • coderosh