From 2c8e651cfd7fe936cee407145708cd207b627912 Mon Sep 17 00:00:00 2001 From: Capri <76640319+caprinux@users.noreply.github.com> Date: Sat, 18 Nov 2023 14:44:14 +0800 Subject: [PATCH] Update post_meta.html hopefully this fixes things --- themes/PaperMod/layouts/partials/post_meta.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/themes/PaperMod/layouts/partials/post_meta.html b/themes/PaperMod/layouts/partials/post_meta.html index 8b5072af..b0c0417e 100644 --- a/themes/PaperMod/layouts/partials/post_meta.html +++ b/themes/PaperMod/layouts/partials/post_meta.html @@ -1,17 +1,23 @@ {{- $scratch := newScratch }} {{- if not .Date.IsZero -}} -{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }} +{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }} {{- end }} {{- if (.Param "ShowReadingTime") -}} {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }} {{- end }} +{{- if (.Param "ShowWordCount") -}} +{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} +{{- end }} + +{{- if not (.Param "hideAuthor") -}} {{- with (partial "author.html" .) }} {{- $scratch.Add "meta" (slice .) }} {{- end }} +{{- end }} {{- with ($scratch.Get "meta") }} -{{- delimit . " · " -}} +{{- delimit . " · " | safeHTML -}} {{- end -}}