Skip to content

Commit

Permalink
Remove hardcoded read time values and make “minute read” values dynam…
Browse files Browse the repository at this point in the history
…ic based off of `site.words_per_minute`

- Close #703
  • Loading branch information
mmistakes committed Dec 22, 2016
1 parent 7ad8d79 commit 1cfce57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _includes/read-time.html
Expand Up @@ -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" }}
Expand Down
4 changes: 2 additions & 2 deletions docs/_includes/read-time.html
Expand Up @@ -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" }}
Expand Down

0 comments on commit 1cfce57

Please sign in to comment.