From 8834c6dc21979b4a38f5be0a1db1be8dab90fd4b Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Sat, 13 Sep 2025 22:44:48 +0000 Subject: [PATCH] Hide reading time when 0 Signed-off-by: Nikolaos Karaolidis --- layouts/partials/components/meta/index.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/layouts/partials/components/meta/index.html b/layouts/partials/components/meta/index.html index 68d77f2..1fe4dd0 100644 --- a/layouts/partials/components/meta/index.html +++ b/layouts/partials/components/meta/index.html @@ -1,14 +1,18 @@
{{ .Date | time.Format ":date_medium" }} - · + {{ if eq .Kind "page" }} {{ range .Params.tags }} - {{ . }} · + {{ . }} + {{ end }} + + {{ if ge .ReadingTime 1 }} + · + + {{ printf "%d min. read" .ReadingTime }} + {{ end }} - - {{ printf "%d min. read" .ReadingTime }} - {{ else }} {{ $count := len .Pages }}