From e2f458cf040bcdbf546de28b40eb8fe096a3b04b Mon Sep 17 00:00:00 2001 From: foo-dogsquared Date: Mon, 29 Oct 2018 11:44:13 +0800 Subject: [PATCH] Remove potential whitespaces through Liquid tags --- _includes/pinpost.html | 14 +++++------ _includes/post_meta.html | 12 ++++++--- _layouts/generator.html | 54 +++++++++++++++++++++------------------- _layouts/home.html | 20 +++++++-------- 4 files changed, 54 insertions(+), 46 deletions(-) diff --git a/_includes/pinpost.html b/_includes/pinpost.html index 05907db..1808798 100644 --- a/_includes/pinpost.html +++ b/_includes/pinpost.html @@ -1,18 +1,18 @@ \ No newline at end of file diff --git a/_includes/post_meta.html b/_includes/post_meta.html index b8c19e3..f18b6b1 100644 --- a/_includes/post_meta.html +++ b/_includes/post_meta.html @@ -7,12 +7,14 @@ {{ page.date | date: date_format }} - - {{ page.content | number_of_words | divided_by: 225 }} minutes + + + {%- assign wpm = page.content | number_of_words | divided_by: 225 -%}{%- if wpm <= 0 -%}1{%- else -%}{{ wpm }}{%- endif -%} + minute{%- if wpm > 1 -%}s{%- endif -%} {%- if page.categories -%} -