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:
parent
1b99e81671
commit
3f59ba883a
1 changed files with 3 additions and 0 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue