From 3283a3b844c433a398f79f9e7caf40192ea388fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:57:18 +0100 Subject: [PATCH] Add param profile to hide author in post (#870) * Add param profile * Fix date duplicated when profile not set * Change param localization --------- Co-authored-by: Emruz Hossain --- layouts/_default/single.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e999f71..5070b3f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -36,15 +36,26 @@
+ {{ if site.Params.features.blog.showAuthor | default true }}
Author Image
{{ partial "helpers/get-author-name.html" . }}

{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}

- + {{ else }} +
+ {{ end }} +

{{ .Page.Title }}

+ + {{ if not (site.Params.features.blog.showAuthor | default true) }} +
+

{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}

+
+ {{ end }} + {{ if site.Params.features.tags.enable }} {{partial "misc/tags.html" .Params.tags }} {{ end }}