From d2f30259581db6e1cce903dbd2f5d1987c3c4f34 Mon Sep 17 00:00:00 2001 From: jeffreytse Date: Mon, 11 Jan 2021 18:48:37 +0800 Subject: fix: invalid integer in get_article_excerpt function --- _includes/functions/get_article_excerpt.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '_includes') diff --git a/_includes/functions/get_article_excerpt.html b/_includes/functions/get_article_excerpt.html index da1f914..73793fd 100644 --- a/_includes/functions/get_article_excerpt.html +++ b/_includes/functions/get_article_excerpt.html @@ -20,11 +20,13 @@ {% assign _article = article | strip_html %} {% assign _words = _article | size %} +{% assign _size = excerpt_size %} + {% if lang != "en" %} {% assign _size = words | times: 1.0 | divided_by: _words - | times: excerpt_size + | times: _size | round %} {% endif %} -- cgit v1.2.3