{"id":19692152,"url":"https://github.com/getgrav/grav-plugin-readingtime","last_synced_at":"2026-05-05T16:01:38.289Z","repository":{"id":55962017,"uuid":"56080252","full_name":"getgrav/grav-plugin-readingtime","owner":"getgrav","description":"Grav ReadingTime Plugin","archived":false,"fork":false,"pushed_at":"2024-07-27T22:43:49.000Z","size":50,"stargazers_count":20,"open_issues_count":7,"forks_count":10,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-10-09T00:24:48.618Z","etag":null,"topics":["grav","grav-plugin","readingtime"],"latest_commit_sha":null,"homepage":"https://getgrav.org","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getgrav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-12T16:33:57.000Z","updated_at":"2025-01-05T12:11:00.000Z","dependencies_parsed_at":"2022-08-15T10:20:41.529Z","dependency_job_id":"d6529ddc-ed77-4164-8633-8ca3bccb860b","html_url":"https://github.com/getgrav/grav-plugin-readingtime","commit_stats":{"total_commits":31,"total_committers":11,"mean_commits":"2.8181818181818183","dds":0.5806451612903225,"last_synced_commit":"04f7e9fd7340ea875f71a9c3fcf9e7fcc43f4476"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/getgrav/grav-plugin-readingtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-readingtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-readingtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-readingtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-readingtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getgrav","download_url":"https://codeload.github.com/getgrav/grav-plugin-readingtime/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-readingtime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32656654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["grav","grav-plugin","readingtime"],"created_at":"2024-11-11T19:12:27.865Z","updated_at":"2026-05-05T16:01:38.232Z","avatar_url":"https://github.com/getgrav.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grav ReadingTime Plugin\n\n**ReadingTime** is a [Grav](http://github.com/getgrav/grav) plugin which allows Grav to display the reading time of a page's content. This is especially useful for blogs and other sites as it gives the reader a quick idea of how much time they will need to set aside to read the page in full.\n\nEnabling the plugin is very simple. Just install the plugin folder to `/user/plugins/` in your Grav install. By default, the plugin is enabled.\n\n# Installation\n\nTo install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the resulting folder to `readingtime`.\n\n\u003e\u003e It is important that the folder be named `readingtime` as this is the folder referenced in the plugin's code.\n\nThe contents of the zipped folder should now be located in the `/your/site/grav/user/plugins/readingtime` directory.\n\n\u003e\u003e NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav), the [Error](https://github.com/getgrav/grav-plugin-error) and [Problems](https://github.com/getgrav/grav-plugin-problems) plugins, and a theme to be installed in order to operate.\n\n# Usage\n\n### Initial Setup\n\nPlace the following line of code in the theme file you wish to add the ReadingTime plugin for:\n\n```\n{{ page.content|readingtime }}\n```\n\nYou need to pass a Twig Filter 'readingtime' to display the reading time values. You can translate the labels with this example:\n\n```\n{{ page.content|readingtime({'minutes_label': 'Minuti', 'minute_label': 'Minuto', 'seconds_label': 'Secondi', 'second_label': 'Secondo'}) }}\n```\n\nI used Italian translation for the labels, you can change with your language.\n\nIf you need you can change the format with this avariable variables (the code is default format):\n\n```\n{{ page.content|readingtime({'format': '{minutes_short_count} {minutes_text}, {seconds_short_count} {seconds_text}'}) }}\n```\n\nAvailable variables:\n\n|      Variable     |       Description       |                                   Example                                    |\n| :---------------- | :---------------------- | :--------------------------------------------------------------------------- |\n| `{minute_label}`  | Minute Label (Singular) | `minute`                                                                     |\n| `{minutes_label}` | Minutes Label (Plural)  | `minutes`                                                                    |\n| `{second_label}`  | Second Label (Singular) | `second`                                                                     |\n| `{seconds_label}` | Second Label (Plural)   | `seconds`                                                                    |\n| `{format}`        | Display Format          | `{minutes_text} {minutes_short_count}, {seconds_text} {seconds_short_count}` |\n\nNot available to edit but used in the format variable:\n\n|         Variable        |               Description                | Example |\n| :---------------------- | :--------------------------------------- | :------ |\n| `{minutes_short_count}` | Displays Minutes with Abbreviated Digits | `2`     |\n| `{seconds_short_count}` | Displays Seconds with Abbreviated Digits | `9`     |\n| `{minutes_long_count}`  | Displays Minutes in Double Digits        | `02`    |\n| `{seconds_long_count}`  | Displays Seconds in Double Digits        | `09`    |\n\nDisplay variables for text labels:\n\n|     Variable     |                                   Description                                    |  Example  |\n| :--------------- | :------------------------------------------------------------------------------- | :-------- |\n| `{minutes_text}` | Displays the Minutes Text Label (Singular or Plural, Based on Number of Minutes) | `minute`  |\n| `{seconds_text}` | Displays the Seconds Text Label (Singular or Plural, Based on Number of Seconds) | `seconds` |\n\n\u003e\u003e NOTE: Any time you are making alterations to a theme's files, you will want to duplicate the theme folder in the `user/themes/` directory, rename it, and set the new name as your active theme. This will ensure that you don't lose your customizations in the event that a theme is updated. Once you have tested the change thoroughly, you can delete or back up that folder elsewhere.\n\n### Include image views\nThe number of seconds to view images is added to the reading time of text when `include_image_views` is set to true.\n\nImages are identified by `\u003cimg\u003e` tags in `page.content()`.\n\nThe default values for `seconds_per_image` (shown below) mean that the first image adds `12` seconds to the reading time, the second adds `11` seconds, the third adds `10` seconds, and so on.\nOnly integers, whitespace, and commas are permitted in the string.\n\n```\nseconds_per_image: '12,11,10,9,8,7,6,5,4,3'\n```\n\nIf there are more images in a page than what is defined in `seconds_per_image` (e.g., more than 10 images in the default shown above) then subsequent images take the last value (`3` seconds in the default shown above).\n\nThe example below adds `5` seconds reading time for all images.\n\n```\nseconds_per_image: 5\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-readingtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetgrav%2Fgrav-plugin-readingtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-readingtime/lists"}