Skip to content

fansoro/fansoro-plugin-reading-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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