{"_id":"@breezertwo/strapi-plugin-reading-time","_rev":"5-fa0bc1e1fc736ac8bb7c64582c5bc3ba","name":"@breezertwo/strapi-plugin-reading-time","dist-tags":{"latest":"5.2.0"},"versions":{"5.0.0":{"name":"@breezertwo/strapi-plugin-reading-time","version":"5.0.0","keywords":["strapi","strapi-plugin","plugin","strapi plugin","reading-time","reading time"],"author":{"url":"https://github.com/breezertwo","name":"@breezertwo"},"license":"MIT","_id":"@breezertwo/strapi-plugin-reading-time@5.0.0","maintainers":[{"name":"breezertwo","email":"brechtelandreas@gmail.com"}],"homepage":"https://github.com/breezertwo/strapi-plugin-reading-time#readme","bugs":{"url":"https://github.com/breezertwo/strapi-plugin-reading-time/issues"},"dist":{"shasum":"6d8b6d0bf21f7d45e4e830429ff2fd89370560b0","tarball":"https://registry.npmjs.org/@breezertwo/strapi-plugin-reading-time/-/strapi-plugin-reading-time-5.0.0.tgz","fileCount":21,"integrity":"sha512-ANuetQZrOm3l53Bfpg0nuPuzWwse+Pre2HdTQGF25F07dx/p1hb3rYOm3Xumi7p45e9/e2Ix3iZcvby39JgCHg==","signatures":[{"sig":"MEUCIQCRnXMtBHp3YBxvaZez7X9CH/TrA2L62bkarmJiqf+rlgIgCCFuw5O9FWNMvtH5S8GDciLMGsvoveey8WQ5IThdwVo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14205},"strapi":{"kind":"plugin","name":"reading-time","description":"Calculate the reading time of your content","displayName":"Reading Time"},"engines":{"npm":">=10.0.0","node":">=22.x.x"},"gitHead":"37a6e1924350dfa1c2d1665eea13ac1986afeca0","scripts":{"test":"jest","yalc:update":"yalc push --scripts --update --replace"},"_npmUser":{"name":"breezertwo","email":"brechtelandreas@gmail.com"},"repository":{"url":"git+https://github.com/breezertwo/strapi-plugin-reading-time.git","type":"git"},"_npmVersion":"10.8.2","description":"Calculate the reading time of your content","directories":{},"_nodeVersion":"22.6.0","dependencies":{"reading-time":"^1.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","lodash":"^4.17.21","@strapi/utils":"^5.4.2","@strapi/strapi":"^5.4.2","@strapi/eslint-config":"^0.2.1"},"peerDependencies":{"lodash":"^4.17.21","@strapi/utils":"^5.4.2","@strapi/strapi":"^5.4.2"},"_npmOperationalInternal":{"tmp":"tmp/strapi-plugin-reading-time_5.0.0_1733223837069_0.3340250338284636","host":"s3://npm-registry-packages"}},"5.1.1":{"name":"@breezertwo/strapi-plugin-reading-time","version":"5.1.1","keywords":["strapi-plugin","strapi","plugin","reading-time","reading time","strapi-plugin-reading-time","time","calculate","length"],"author":{"name":"breezertwo","email":"andreas@heycare.com"},"license":"MIT","_id":"@breezertwo/strapi-plugin-reading-time@5.1.1","maintainers":[{"name":"breezertwo","email":"brechtelandreas@gmail.com"}],"homepage":"https://github.com/breezertwo/strapi-plugin-reading-time","bugs":{"url":"https://github.com/breezertwo/strapi-plugin-reading-time/issues"},"dist":{"shasum":"47256593e4fd9f86833d146c4dfc5921461b48cc","tarball":"https://registry.npmjs.org/@breezertwo/strapi-plugin-reading-time/-/strapi-plugin-reading-time-5.1.1.tgz","fileCount":20,"integrity":"sha512-20BOgf+uPo8KM82ukaH5zqRR6d5bqwlafJ7mhREnyC24yIzRAZJT3NdW64lGyOJ4om70BTt550Xb/8dSF+OdBA==","signatures":[{"sig":"MEUCIQCkCVd4JRd7P0ba5keGX7wBEmBAcErMHEA+MnjpPa5vFwIgXd8lhLD06aQ5onssgYvqklid75gNinPexAaj/r2rZ4s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267648},"strapi":{"kind":"plugin","name":"reading-time","description":"Calculate the reading time of your content","displayName":"Reading Time"},"exports":{"./package.json":"./package.json","./strapi-server":{"types":"./dist/server/src/index.d.ts","import":"./dist/server/index.mjs","source":"./server/src/index.ts","default":"./dist/server/index.js","require":"./dist/server/index.js"}},"gitHead":"5a01f3b5986b908535d796020c5573710feb3e41","scripts":{"test":"vitest run","build":"strapi-plugin build","watch":"strapi-plugin watch","verify":"strapi-plugin verify","typecheck":"tsc -p server/tsconfig.json --noEmit","test:watch":"vitest","watch:link":"strapi-plugin watch:link","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"breezertwo","email":"brechtelandreas@gmail.com"},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/breezertwo/strapi-plugin-reading-time.git","type":"git"},"_npmVersion":"10.9.3","description":"Calculate the reading time of your content","directories":{},"_nodeVersion":"22.19.0","dependencies":{"lodash":"4.17.23","reading-time":"1.5.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","prettier":"^3.8.1","release-it":"^19.2.4","typescript":"^5.9.3","@strapi/strapi":"^5.35.0","@strapi/sdk-plugin":"^5.4.0","@vitest/coverage-v8":"^4.0.18","@strapi/typescript-utils":"^5.35.0","@release-it/conventional-changelog":"10.0.4"},"peerDependencies":{"@strapi/utils":"^5","@strapi/strapi":"^5","@strapi/sdk-plugin":"^5"},"_npmOperationalInternal":{"tmp":"tmp/strapi-plugin-reading-time_5.1.1_1770308383693_0.48182610073908627","host":"s3://npm-registry-packages-npm-production"}},"5.2.0":{"name":"@breezertwo/strapi-plugin-reading-time","version":"5.2.0","description":"Calculate the reading time of your content","exports":{"./package.json":"./package.json","./strapi-server":{"types":"./dist/server/src/index.d.ts","source":"./server/src/index.ts","import":"./dist/server/index.mjs","require":"./dist/server/index.js","default":"./dist/server/index.js"}},"scripts":{"build":"strapi-plugin build","watch":"strapi-plugin watch","watch:link":"strapi-plugin watch:link","verify":"strapi-plugin verify","test":"vitest run","test:watch":"vitest","typecheck":"tsc -p server/tsconfig.json --noEmit","format":"oxfmt .","format:check":"oxfmt --check ."},"dependencies":{"lodash":"4.18.1","reading-time":"1.5.0"},"devDependencies":{"@release-it/conventional-changelog":"12.0.0","@strapi/sdk-plugin":"6.1.1","@strapi/strapi":"^5.51.1","@strapi/typescript-utils":"^5.51.1","oxfmt":"^0.61.0","release-it":"^21.0.1","typescript":"^5.9.3","vitest":"^4.1.10","zod":"^3.25.76"},"peerDependencies":{"@strapi/strapi":"^5","zod":"^3 || ^4"},"strapi":{"displayName":"Reading Time","name":"reading-time","description":"Calculate the reading time of your content","kind":"plugin"},"keywords":["strapi-plugin","strapi","plugin","reading-time","reading time","strapi-plugin-reading-time","time","calculate","length"],"license":"MIT","author":{"name":"breezertwo","email":"andreas@heycare.com"},"repository":{"type":"git","url":"git+https://github.com/breezertwo/strapi-plugin-reading-time.git"},"bugs":{"url":"https://github.com/breezertwo/strapi-plugin-reading-time/issues"},"homepage":"https://github.com/breezertwo/strapi-plugin-reading-time","release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"gitHead":"579a654bb9744c20b2d1a85f46c3dbc16e0e039f","_id":"@breezertwo/strapi-plugin-reading-time@5.2.0","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-SQwe3P0irrF1zqGg7tgDUHk+b1Zl7obuRjQY0LgMQ/F9peOqUQ1/0/Do17llpmymjUlvm/d/Hj+E2V4vHjNxrw==","shasum":"275191d2b18ddce69b625d6ba5cea613deb55c89","tarball":"https://registry.npmjs.org/@breezertwo/strapi-plugin-reading-time/-/strapi-plugin-reading-time-5.2.0.tgz","fileCount":20,"unpackedSize":30169,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCa/OPPmIrEakBH+6eebi0LxBedOGnTnkYWmj3zd4LQCwIhAJ/JGWwi6YxYcEkt9T6+yPNinp5RJhf9englq7nSBFIy"}]},"_npmUser":{"name":"breezertwo","email":"brechtelandreas@gmail.com"},"directories":{},"maintainers":[{"name":"breezertwo","email":"brechtelandreas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/strapi-plugin-reading-time_5.2.0_1785683477881_0.5199942246450275"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-03T11:03:56.949Z","modified":"2026-08-02T15:11:18.195Z","5.0.0":"2024-12-03T11:03:57.245Z","5.1.0":"2026-02-05T12:46:31.490Z","5.1.1":"2026-02-05T16:19:43.905Z","5.2.0":"2026-08-02T15:11:18.057Z"},"bugs":{"url":"https://github.com/breezertwo/strapi-plugin-reading-time/issues"},"author":{"name":"breezertwo","email":"andreas@heycare.com"},"license":"MIT","homepage":"https://github.com/breezertwo/strapi-plugin-reading-time","keywords":["strapi-plugin","strapi","plugin","reading-time","reading time","strapi-plugin-reading-time","time","calculate","length"],"repository":{"type":"git","url":"git+https://github.com/breezertwo/strapi-plugin-reading-time.git"},"description":"Calculate the reading time of your content","maintainers":[{"name":"breezertwo","email":"brechtelandreas@gmail.com"}],"readme":"# Strapi Plugin Reading Time\n\nA plugin for [Strapi](https://github.com/strapi/strapi) that provides the ability to automatically calculate the reading time of text based fields.\nSupports extracting text from nearly all field types. (e.g Text, Rich text (Blocks), Markdown, Lists, Image captions, ...)\n\n<center>\n  <a href=\"https://www.npmjs.com/package/@breezertwo/strapi-plugin-reading-time\">\n    <img src=\"https://img.shields.io/npm/v/%40breezertwo%2Fstrapi-plugin-reading-time?style=flat-square&color=blue\" alt=\"NPM Version\" />\n  </a>\n  <a href=\"https://github.com/strapi/strapi\">\n    <img src=\"https://img.shields.io/badge/strapi-v5.0.0+-green?style=flat-square\" alt=\"Strapi Version\" />\n  </a>\n  <a href=\"https://github.com/breezertwo/strapi-plugin-reading-time/actions/workflows/test.yaml\">\n    <img src=\"https://github.com/breezertwo/strapi-plugin-reading-time/actions/workflows/test.yaml/badge.svg\" alt=\"Test\" />\n  </a>\n</center>\n\n## Installation\n\n```bash\nnpm i @breezertwo/strapi-plugin-reading-time\n```\n\n## Configuration\n\nAdd the following config to `./config/plugins.ts`.\n\n```javascript\nmodule.exports = ({ env }) => ({\n  // ...\n  'reading-time': {\n    enabled: true,\n    config: {\n      contentTypes: {\n        'api::article.article': {                   // UID of collection-type\n          field: 'reading_time',                    // the field name for the reading time value in the schema\n          references: ['content', 'description'],   // the names of the fields included in the reading time calculation\n        },\n        // ...\n      },\n    },\n  },\n  // ...\n});\n```\n\nThe field (e.g `reading_time`) must be float/decimal type in the collection-type schema and unique for each locale.\n\n_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._\n\n### How reading time is recalculated\n\nAbsent or empty references are skipped.If no reference has any content, the reading time is not recalculated.\n\nOn **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.\n\nOn **create**, every configured reference is counted.\n\n### Components and dynamic zones\n\n`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:\n\nExample:\n\n```json\n[...]\n\"blocks\": {\n  \"type\": \"dynamiczone\",\n  \"components\": [\n    \"shared.media\",\n    \"shared.quote\",\n    \"shared.rich-text\",\n    \"shared.slider\"\n  ]\n},\n[...]\n```\n\n```javascript\nconfig: {\n  contentTypes: {\n    'api::article.article': {\n      field: 'reading_time',\n      references: ['title', 'blocks'],\n    },\n  },\n},\n```\n\nText inside uploaded media is limited to `caption` and `alternativeText` — filenames, mime types and format variants are never counted.\n\n## Upgrading\n\n### `skipUndefinedReferences` was removed\n\nDelete it from your config; the plugin warns on startup if it is still set. Its `true` behaviour is now the only behaviour.\n\nPreviously 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.\n\nReading times are now calculated from whichever references have content, so entries that previously got no value will get one on their next save.\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License — see the [LICENSE](LICENSE.md) file for details.\n\nIf you find this plugin helpful, please consider:\n\n- ⭐ **Starring** the repository\n- 🐛 **Reporting** bugs and issues\n- 🤝 **Contributing** to the project\n- 💡 **Suggesting** new features\n- 📣 **Sharing** with others who might benefit\n","readmeFilename":"README.md"}