1.1.5 • Published 4 years ago

ulka-plugin-reading-time v1.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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)
            }
        },
    ],
}
1.1.5

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago