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:
parent
3f59ba883a
commit
1a56e91945
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,7 @@
|
|||
{{ $authorImage:= "/assets/images/default-avatar.png"}}
|
||||
{{ if .Site.Data.site.author}}
|
||||
{{ $authorImage = .Site.Data.site.author.image | relURL }}
|
||||
{{ end}}
|
||||
{{ if eq (printf "%T" .Params.author ) "maps.Params" }}
|
||||
{{ with .Params.author }}
|
||||
{{ if .image }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue