From 1cfce57cfbb0203ed3462cb2f252b30d5d09ab29 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 21 Dec 2016 22:52:18 -0500 Subject: [PATCH] =?UTF-8?q?Remove=20hardcoded=20read=20time=20values=20and?= =?UTF-8?q?=20make=20=E2=80=9Cminute=20read=E2=80=9D=20values=20dynamic=20?= =?UTF-8?q?based=20off=20of=20`site.words=5Fper=5Fminute`=20-=20Close=20#7?= =?UTF-8?q?03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _includes/read-time.html | 4 ++-- docs/_includes/read-time.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_includes/read-time.html b/_includes/read-time.html index e8e9063d..df88d529 100644 --- a/_includes/read-time.html +++ b/_includes/read-time.html @@ -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" }} diff --git a/docs/_includes/read-time.html b/docs/_includes/read-time.html index e8e9063d..df88d529 100644 --- a/docs/_includes/read-time.html +++ b/docs/_includes/read-time.html @@ -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" }}