2019-10-04 16:50:05 +02:00
|
|
|
{% assign words_per_minute = page.words_per_minute | default: site.words_per_minute | default: 200 %}
|
2016-11-18 18:22:40 +01:00
|
|
|
|
2016-03-23 03:28:12 +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-03-22 02:42:55 +01:00
|
|
|
|
2016-12-22 04:52:18 +01:00
|
|
|
{% if words < words_per_minute %}
|
2016-11-18 18:22:40 +01: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-12-22 04:52:18 +01:00
|
|
|
{% elsif words == words_per_minute %}
|
2016-11-18 18:22:40 +01:00
|
|
|
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
|
2016-03-22 02:42:55 +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" }}
|
2019-10-04 16:50:05 +02:00
|
|
|
{% endif %}
|