Search by

pixelsushirobot / kirby-readingtime

PixelSushiRobot

Estimates the reading time for any Kirby text field. Modernized for Kirby 3/4/5.

Package info

github.com/PixelSushiRobot/kirby-readingtime

Type:kirby-plugin

pkg:composer/pixelsushirobot/kirby-readingtime

Statistics

Installs: 30

Dependents: 0

Suggesters: 0

Stars: 0

3.0.2 2026-07-12 09:19 UTC

This package is auto-updated.

Last update: 2026-09-12 10:34:03 UTC


README

Estimates the reading time for any Kirby text field. A modernized fork of the archived getkirby-v2/readingtime-plugin, rewritten for the Kirby 3/4/5 plugin API.

What's different from the original

  • Registered via the modern Kirby::plugin() / fieldMethods API (works on Kirby 3, 4 and 5).
  • Configurable words-per-minute via a plugin option (default 200).
  • KirbyText-aware word count: text is parsed and tag-stripped before counting, so Markdown/KirbyTag syntax isn't counted as words.
  • Ships with composer.json and a version constant.

Installation

Manual

Copy the readingtime folder into /site/plugins.

Composer

composer require pixelsushirobot/kirby-readingtime

Usage

<?= $page->text()->readingtime() ?>

Outputs e.g. 4 minute read, or 35 second read for sub-minute content.

Configuration

Set a global words-per-minute in site/config/config.php:

return [
    'pixelsushirobot.readingtime.wpm' => 240
];

Or override per call, along with labels and format:

<?= $page->text()->readingtime([
    'wpm'     => 180,
    'minute'  => 'Minute',
    'minutes' => 'Minuten',
    'second'  => 'Sekunde',
    'seconds' => 'Sekunden',
    'format'  => '{minutesCount} {minutesLabel} – {secondsCount} {secondsLabel}'
]) ?>

Options

Option Default Description
wpm 200 Words read per minute
minute / minutes minute Singular / plural minute label
second / seconds second Singular / plural second label
format {minutesCount} {minutesLabel} read Output format
format.alt {secondsCount} {secondsLabel} read Format used when under one minute
format.alt.enable true Use the alt format for sub-minute content

Credits

Original author: Roy Lodder. Contributor: Bastian Allgeier.

License

MIT