Remove hardcoded read time values and make “minute read” values dynamic based off of site.words_per_minute

- Close #703
This commit is contained in:
Michael Rose 2016-12-21 22:52:18 -05:00
parent 7ad8d79f93
commit 1cfce57cfb
2 changed files with 4 additions and 4 deletions

View file

@ -6,9 +6,9 @@
{% assign words = page.content | strip_html | number_of_words %}
{% endif %}
{% if words < 180 %}
{% if words < words_per_minute %}
{{ 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 %}
{% elsif words == words_per_minute %}
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
{% else %}
{{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}

View file

@ -6,9 +6,9 @@
{% assign words = page.content | strip_html | number_of_words %}
{% endif %}
{% if words < 180 %}
{% if words < words_per_minute %}
{{ 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 %}
{% elsif words == words_per_minute %}
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
{% else %}
{{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}