From 6e0afcf9e82d86660eb90da491da647aa358f2b7 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 26 Aug 2021 01:26:16 +0800 Subject: [PATCH] Improve recognition of CJK --- _includes/read-time.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_includes/read-time.html b/_includes/read-time.html index e537693..2822d69 100644 --- a/_includes/read-time.html +++ b/_includes/read-time.html @@ -24,6 +24,7 @@ title="{{ words }} {{ site.data.locales[lang].post.words }}"> {{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}} {%- if include.prompt -%} - {% unless site.lang contains 'zh' %}{{" "}}{% endunless %}{{ read_prompt }} + {% assign _prompt_words = read_prompt | number_of_words: 'auto' %} + {% unless _prompt_words > 1 %}{{" "}}{% endunless %}{{ read_prompt }} {%- endif -%}