From 2628a07c95a7205a09b2f7bdefe9629c7400e423 Mon Sep 17 00:00:00 2001 From: Reorx Date: Thu, 21 Apr 2022 17:32:29 +0800 Subject: [PATCH] add ShowAuthor param --- layouts/partials/post_meta.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 4758c05..38e957c 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -12,9 +12,11 @@ {{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} {{- end }} +{{- if (.Param "ShowAuthor") -}} {{- with (partial "author.html" .) }} {{- $scratch.Add "meta" (slice .) }} {{- end }} +{{- end }} {{- with ($scratch.Get "meta") }} {{- delimit . " ยท " -}}