summaryrefslogtreecommitdiff
path: root/_includes/views/post-header.html
diff options
context:
space:
mode:
authorjeffreytse <jeffreytse.mail@gmail.com>2021-01-11 11:18:35 +0800
committerjeffreytse <jeffreytse.mail@gmail.com>2021-01-11 11:18:35 +0800
commit48d4da4f1b0ee6d8a095fca301e6f3486a35f0b2 (patch)
tree4a73066c24e5d8f5129eedaa3ff41a829c4f9565 /_includes/views/post-header.html
parente3be95fe06ca57f7fa774e7b3d9efafe77cbb802 (diff)
fix: reading time was incorrect for cjk words (#20)
The liquid filter `number_of_words` is for english words, so here we use a calculation to estimate accurately the words, especially when the language is not English.
Diffstat (limited to '_includes/views/post-header.html')
-rw-r--r--_includes/views/post-header.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/_includes/views/post-header.html b/_includes/views/post-header.html
index df6447b..e59fd91 100644
--- a/_includes/views/post-header.html
+++ b/_includes/views/post-header.html
@@ -9,6 +9,7 @@
</time>
{% assign article = page.content %}
+ {% assign lang = page.lang %}
{%- include functions.html func='get_reading_time' -%}
{% assign reading_time = return %}
<span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span>