From: Kai Moritz Date: Fri, 19 Dec 2025 00:20:34 +0000 (+0100) Subject: Post-Metadata überarbeitet X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=68c9fbe643d229d641d72ad3166faf92e29f47e7;p=website Post-Metadata überarbeitet --- 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") }}