From 3f59ba883a2ac960c79dd0b9bfd1ba3478c7ee61 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Le Duigou Date: Wed, 24 Jun 2020 08:24:29 +0200 Subject: [PATCH] Author name should default to site author If author name is not present in the blog post it should default to site author --- layouts/partials/helpers/get-author-name.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/helpers/get-author-name.html b/layouts/partials/helpers/get-author-name.html index e15075c..2bcf239 100644 --- a/layouts/partials/helpers/get-author-name.html +++ b/layouts/partials/helpers/get-author-name.html @@ -1,4 +1,7 @@ {{ $authorName:= "John Doe"}} +{{ if .Site.Data.site.author}} + {{ $authorName = .Site.Data.site.author.name }} +{{ end}} {{ if eq (printf "%T" .Params.author ) "maps.Params" }} {{ with .Params.author }} {{ if .name }}