If no author specified in blog post, it should default to site author (#6)

* Author name should default to site author 

If author name is not present in the blog post it should default to site author

* Default to site author

If author image is not present in the blog post, it should default to the site author
This commit is contained in:
Jean-Baptiste Le Duigou 2020-06-24 09:27:28 +02:00 committed by GitHub
parent eb32e547f5
commit 5517dae23a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

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