{"id":15450406,"url":"https://github.com/johanbrook/eleventy-plugin-reading-time","last_synced_at":"2025-10-12T05:02:42.784Z","repository":{"id":32998347,"uuid":"149148589","full_name":"johanbrook/eleventy-plugin-reading-time","owner":"johanbrook","description":"A non-dependency reading time plugin for Eleventy static site generator.","archived":false,"fork":false,"pushed_at":"2022-03-27T23:56:02.000Z","size":2,"stargazers_count":28,"open_issues_count":6,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T19:50:23.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johanbrook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-17T15:41:14.000Z","updated_at":"2025-03-25T04:43:01.000Z","dependencies_parsed_at":"2022-08-07T19:16:49.788Z","dependency_job_id":null,"html_url":"https://github.com/johanbrook/eleventy-plugin-reading-time","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johanbrook/eleventy-plugin-reading-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Feleventy-plugin-reading-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Feleventy-plugin-reading-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Feleventy-plugin-reading-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Feleventy-plugin-reading-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johanbrook","download_url":"https://codeload.github.com/johanbrook/eleventy-plugin-reading-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanbrook%2Feleventy-plugin-reading-time/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348645,"owners_count":24236298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T21:05:12.323Z","updated_at":"2025-10-12T05:02:37.730Z","avatar_url":"https://github.com/johanbrook.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reading time plugin for Eleventy\n\nA non-dependency reading time plugin for [Eleventy](https://www.11ty.io/) static site generator. This plugin provides a template tag which prints the number of minutes or seconds required to read the given text.\n\n## Install\n\n```shell\nnpm install --save eleventy-plugin-reading-time\n```\n\n## Usage\n\nIn your Eleventy config file (defaults to `.eleventy.js`):\n\n```js\nconst readingTime = require('eleventy-plugin-reading-time');\n\nmodule.exports = (eleventyConfig) =\u003e {\n  eleventyConfig.addPlugin(readingTime);\n};\n```\n\nNow you can use the `readingTime` filter in your Nunjuck templates:\n\n```html\n\u003cspan\u003eAbout {{ someTextContent | readingTime } reading time}\u003c/span\u003e\n```\n\nprints\n\n```html\n\u003cspan\u003eAbout 6 min reading time\u003c/span\u003e\n```\n\nExample `post.njk` template:\n\n```html\n\u003carticle role=\"article\"\u003e\n    \u003cheader\u003e\n        \u003ch1\u003e{{ title }}\u003c/h1\u003e\n        \u003cp\u003e\n            \u003cspan class=\"meta__stats\"\u003eAbout {{ content | readingTime }} reading time\u003c/span\u003e\n        \u003c/p\u003e\n    \u003c/header\u003e\n\n    \u003cdiv\u003e\n        {{ content | safe }}\n    \u003c/div\u003e\n\u003c/article\u003e\n```\n\nIf you're in a collection loop, this filter accepts a collection object too:\n\n```html\n{% for post in posts %}\n    \u003cli\u003e\n        \u003ch1\u003e{{post.title}}\u003c/h1\u003e\n        \u003cp\u003eAbout {{ post | readingTime }} reading time.\u003c/p\u003e\n    \u003c/li\u003e\n{% endfor %}\n```\n\n## To Do\n\n- [ ] Support more template engines.\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanbrook%2Feleventy-plugin-reading-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohanbrook%2Feleventy-plugin-reading-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanbrook%2Feleventy-plugin-reading-time/lists"}