Estimated reading time plugin for Fansoro
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CHANGELOG.md
LICENSE
README.md
reading-time.php
reading-time.yml

README.md

Reading Time

Estimated reading time plugin for Fansoro

Installation

See this instruction

Usage

Simple usage

{readingTime($post.content)}

Localization

{readingTime($post.content, [
    'minute'  => 'Minute',
    'minutes' => 'Minutes',
    'second'  => 'Second',
    'seconds' => 'Seconds'])}

Set custom format of the result

{readingTime($post.content, [
    'minute'  => 'Minute',
    'minutes' => 'Minutes',
    'second'  => 'Second',
    'seconds' => 'Seconds',
    'format'  => '{minutes_count} {minutes_label} – {seconds_count} {seconds_label}'])}

Enable alternative format that hides the minute label.

{readingTime($post.content, [
    'format' => '{minutes_count} {minutes_label}, {seconds_count} {seconds_label}',
    'format.alt' => '{seconds_count} {seconds_label}',
    'format.alt.enable' => true])}

License

See LICENSE