5.0.0 • Published 11 months ago

@breezertwo/strapi-plugin-reading-time v5.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Test

Strapi Plugin Reading Time

A plugin for Strapi that provides the ability to calculate the reading time texed based content. Supports plain text and Strapis block rich text fields.

Installation

npm i @breezertwo/strapi-plugin-reading-time

Configuration

Add the following config to ./config/plugins.js.

Please note that the field (e.g reading_time) referenced in the configuration file must exist. You can add it using the Strapi Admin UI. Also note that adding a field at a later point in time will require you to unpublish, change, save and republish the entry/entries in order for this plugin to work correctly.

module.exports = ({ env }) => ({
  // ...
  "reading-time": {
    enabled: true,
    config: {
      skipUndefinedReferences: true,
      contentTypes: {
        article: {
          field: "reading_time",
          references: "content",
        },
      },
    },
  },
  // ...
});

This will listen for any record created or updated in the article content type and set the display time to read value for the reading_time field automatically based on the content field.

skipUndefinedReferences

Links

  • Original plugin author: Paidly