diff options
author | jeffreytse <jeffreytse.mail@gmail.com> | 2021-01-11 18:34:51 +0800 |
---|---|---|
committer | jeffreytse <jeffreytse.mail@gmail.com> | 2021-01-11 18:34:51 +0800 |
commit | fac480f381ea6ed2a1b294292c471f0daae365a4 (patch) | |
tree | df93993a63e28706ed58f44a68a8d4aefed4126e | |
parent | a037056663c3ac910742d4f53834bae9a283f222 (diff) |
chore: reivise get_reading_time function
-rw-r--r-- | _includes/functions/get_reading_time.html | 16 |
1 files 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 |