Author name should default to site author

If author name is not present in the blog post it should default to site author
This commit is contained in:
Jean-Baptiste Le Duigou 2020-06-24 08:24:29 +02:00 committed by GitHub
parent 1b99e81671
commit 3f59ba883a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 }}