Skip to content

Commit 1cfce57

Browse files
committed
Remove hardcoded read time values and make “minute read” values dynamic based off of site.words_per_minute
- Close mmistakes#703
1 parent 7ad8d79 commit 1cfce57

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

_includes/read-time.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
{% assign words = page.content | strip_html | number_of_words %}
77
{% endif %}
88

9-
{% if words < 180 %}
9+
{% if words < words_per_minute %}
1010
{{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
11-
{% elsif words < 360 %}
11+
{% elsif words == words_per_minute %}
1212
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
1313
{% else %}
1414
{{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}

docs/_includes/read-time.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
{% assign words = page.content | strip_html | number_of_words %}
77
{% endif %}
88

9-
{% if words < 180 %}
9+
{% if words < words_per_minute %}
1010
{{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
11-
{% elsif words < 360 %}
11+
{% elsif words == words_per_minute %}
1212
1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
1313
{% else %}
1414
{{ words | divided_by:words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}

0 commit comments

Comments
 (0)