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 mmistakes#703
  • Loading branch information
jluccisano committed Feb 12, 2017
1 parent 2d92470 commit d8e2219
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 d8e2219

Please sign in to comment.