2016-11-23 02:29:35 +01:00
|
|
|
{% assign words_per_minute = site.words_per_minute | default: 200 %}
|
|
|
|
|
2016-10-30 01:02:14 +02: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-23 02:29:35 +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-10-30 01:02:14 +02:00
|
|
|
{% else %}
|
2016-11-23 02:29:35 +01:00
|
|
|
{{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
|
|
|
{% endif %}
|