From 68c9fbe643d229d641d72ad3166faf92e29f47e7 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 19 Dec 2025 01:20:34 +0100 Subject: [PATCH] =?utf8?q?Post-Metadata=20=C3=BCberarbeitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- layouts/_partials/post_meta.html | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/layouts/_partials/post_meta.html b/layouts/_partials/post_meta.html index ae996bad..b0aa0087 100644 --- a/layouts/_partials/post_meta.html +++ b/layouts/_partials/post_meta.html @@ -1,21 +1,15 @@ {{- $scratch := newScratch }} -{{- if not .Date.IsZero -}} -{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default ":date_long" site.Params.DateFormat)))) }} +{{- if (.Param "ShowWordCount") -}} +{{- $scratch.Add "meta" (slice (printf "%s" (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }} {{- end }} {{- if (.Param "ShowReadingTime") -}} {{- $scratch.Add "meta" (slice (printf "%s" (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)))) }} {{- end }} -{{- if (.Param "ShowWordCount") -}} -{{- $scratch.Add "meta" (slice (printf "%s" (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }} -{{- end }} - -{{- if not (.Param "hideAuthor") -}} -{{- with (partial "author.html" .) }} -{{- $scratch.Add "meta" (slice (printf "%s" .)) }} -{{- end }} +{{- if not .Date.IsZero -}} +{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default ":date_long" site.Params.DateFormat)))) }} {{- end }} {{- with ($scratch.Get "meta") }} -- 2.39.5