承接 pixelsushirobot/kirby-readingtime 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pixelsushirobot/kirby-readingtime

Composer 安装命令:

composer require pixelsushirobot/kirby-readingtime

包简介

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

README 文档

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

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固