npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@breezertwo/strapi-plugin-reading-time

v5.2.0

Published

Calculate the reading time of your content

Downloads

280

Readme

Strapi Plugin Reading Time

A plugin for Strapi that provides the ability to automatically calculate the reading time of text based fields. Supports extracting text from nearly all field types. (e.g Text, Rich text (Blocks), Markdown, Lists, Image captions, ...)

Installation

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

Configuration

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

module.exports = ({ env }) => ({
  // ...
  'reading-time': {
    enabled: true,
    config: {
      contentTypes: {
        'api::article.article': {                   // UID of collection-type
          field: 'reading_time',                    // the field name for the reading time value in the schema
          references: ['content', 'description'],   // the names of the fields included in the reading time calculation
        },
        // ...
      },
    },
  },
  // ...
});

The field (e.g reading_time) must be float/decimal type in the collection-type schema and unique for each locale.

Adding the reading time field to an existing collection-type will require you to change, save or republish the entry/entries in order for this plugin to update the field correctly.

How reading time is recalculated

Absent or empty references are skipped.If no reference has any content, the reading time is not recalculated.

On update, the plugin only recalculates when every configured reference is in the payload. A partial update (e.g. PUT that sends only title) does not recalculate, because the fields it would need aren't part of the request. Strapi admin panel always submits the full form, entries edited through the UI are always recalculated; only partial API writes are affected.

On create, every configured reference is counted.

Components and dynamic zones

references decides what is counted. Point it at a component or dynamic zone and every text field inside is counted, however deeply nested, with no further configuration:

Example:

[...]
"blocks": {
  "type": "dynamiczone",
  "components": [
    "shared.media",
    "shared.quote",
    "shared.rich-text",
    "shared.slider"
  ]
},
[...]
config: {
  contentTypes: {
    'api::article.article': {
      field: 'reading_time',
      references: ['title', 'blocks'],
    },
  },
},

Text inside uploaded media is limited to caption and alternativeText — filenames, mime types and format variants are never counted.

Upgrading

skipUndefinedReferences was removed

Delete it from your config; the plugin warns on startup if it is still set. Its true behaviour is now the only behaviour.

Previously the default (false) meant that a single empty reference suppressed the calculation entirely, so a content-type referencing an empty dynamic zone or an unfilled optional field never got a reading time at all. The option also had no effect on updates, since a partial payload is short-circuited before it is consulted.

Reading times are now calculated from whichever references have content, so entries that previously got no value will get one on their next save.


📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

If you find this plugin helpful, please consider:

  • Starring the repository
  • 🐛 Reporting bugs and issues
  • 🤝 Contributing to the project
  • 💡 Suggesting new features
  • 📣 Sharing with others who might benefit