2016-11-18 18:22:40 +01:00
|
|
|
{% assign words_per_minute = site.words_per_minute | default: 200 %}
|
|
|
|
|
2016-11-03 16:52:04 +01: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-11-18 18:22:40 +01:00
|
|
|
{% if words < 180 %}
|
|
|
|
{{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
|
|
|
{% elsif words < 360 %}
|
|
|
|
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
2016-11-03 16:52:04 +01:00
|
|
|
{% else %}
|
2016-11-18 18:22:40 +01:00
|
|
|
{{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
2016-11-03 16:52:04 +01:00
|
|
|
{% endif %}
|