From c9af265921d7c91f35cc791a1b842611b98d6c65 Mon Sep 17 00:00:00 2001 From: Nick Kocharhook Date: Sun, 2 Jan 2022 16:11:21 +0000 Subject: [PATCH] Remove reading time from pages, but leave it for other article types. --- layouts/partials/article/components/details.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 64d6c6e..2e7d1bc 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -21,7 +21,12 @@ {{ end }} - {{ if or (not .Date.IsZero) (.Site.Params.article.readingTime) }} + {{ $showReadingTime := .Site.Params.article.readingtime }} + {{ if isset .Params "readingtime" }} + {{ $showReadingTime = .Params.readingtime }} + {{ end }} + + {{ if or (not .Date.IsZero) ($showReadingTime) }}