From 6f2f3cd067113ac6e1c47f72fbe3da22810832b0 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Fri, 24 Feb 2023 15:51:30 +0100 Subject: [PATCH] Default to site.Author.name for post author. --- layouts/partials/author-date.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/author-date.html b/layouts/partials/author-date.html index f6355a7..eca4638 100644 --- a/layouts/partials/author-date.html +++ b/layouts/partials/author-date.html @@ -1,3 +1,3 @@ -{{ with $.Param "author" }}{{ end -}} -{{ if and .Date ($.Param "author") }} - {{ end -}} -{{ with .Date }}{{ end }} \ No newline at end of file +{{ with $.Param "author" | default site.Author.name }}{{ end -}} +{{ if and .Date (or ($.Param "author") site.Author.name) }} - {{ end -}} +{{ with .Date }}{{ end }}