Socket
Book a DemoInstallSign in
Socket

@breezertwo/strapi-plugin-reading-time

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@breezertwo/strapi-plugin-reading-time

Calculate the reading time of your content

latest
Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
19
90%
Maintainers
0
Weekly downloads
 
Created
Source

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

  • Original plugin author: Paidly

Keywords

strapi

FAQs

Package last updated on 03 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts