From fac480f381ea6ed2a1b294292c471f0daae365a4 Mon Sep 17 00:00:00 2001 From: jeffreytse Date: Mon, 11 Jan 2021 18:34:51 +0800 Subject: chore: reivise get_reading_time function --- _includes/functions/get_reading_time.html | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/_includes/functions/get_reading_time.html b/_includes/functions/get_reading_time.html index e1d23fe..0035784 100644 --- a/_includes/functions/get_reading_time.html +++ b/_includes/functions/get_reading_time.html @@ -14,20 +14,8 @@ {% assign speed = 160 %} {% endif %} -{% assign words = article | number_of_words %} - -{% if lang != "en" %} - {% assign words = words - | times: 0.6 - | round %} - {% assign words = article - | strip_html - | strip_newlines - | size - | times: 0.4 - | plus: words - | round %} -{% endif %} +{%- include functions.html func='get_article_words' -%} +{% assign words = return %} {% assign total_mins = words | divided_by: speed -- cgit v1.2.3