2016-03-22 22:28:12 -04:00
|
|
|
{% if post.read_time %}
|
|
|
|
{% assign words = post.content | strip_html | number_of_words %}
|
|
|
|
{% elsif page.read_time %}
|
|
|
|
{% assign words = page.content | strip_html | number_of_words %}
|
|
|
|
{% endif %}
|
2016-03-21 21:42:55 -04:00
|
|
|
|
2016-06-07 01:03:59 -05:00
|
|
|
{% if site.words_per_minute %}
|
|
|
|
{% if words < 180 %}
|
2016-07-29 12:16:53 -04:00
|
|
|
{{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
2016-06-07 01:03:59 -05:00
|
|
|
{% elsif words < 360 %}
|
2016-07-29 12:16:53 -04:00
|
|
|
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
2016-06-07 01:03:59 -05:00
|
|
|
{% else %}
|
2016-07-29 12:16:53 -04:00
|
|
|
{{ words | divided_by:site.words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
2016-06-07 01:03:59 -05:00
|
|
|
{% endif %}
|
2016-03-21 21:42:55 -04:00
|
|
|
{% else %}
|
2016-07-29 12:16:53 -04:00
|
|
|
{{ site.data.ui-text[site.locale].undefined_wpm | "Undefined parameter words_per_minute at _config.yml" }}
|
2016-03-21 21:42:55 -04:00
|
|
|
{% endif %}
|