Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

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 mmistakes#703
  • Loading branch information
makaroniame committed Dec 22, 2016
1 parent 238d356 commit 2c0afca
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 2c0afca

Please sign in to comment.