Fix the single template to use the authors avatar correctly
This commit is contained in:
parent
47c4ef0251
commit
dda04c533e
4 changed files with 18 additions and 13 deletions
|
@ -1,7 +1,12 @@
|
|||
{{ $authorImage:= "/assets/images/default-avatar.png"}}
|
||||
{{ if .Site.Data.site.author}}
|
||||
{{ $authorImage = .Site.Data.site.author.image | relURL }}
|
||||
{{ end}}
|
||||
{{ $author:= .Site.Data.author }}
|
||||
{{ if (index .Site.Data .Site.Language.Lang).author }}
|
||||
{{ $author = (index .Site.Data .Site.Language.Lang).author }}
|
||||
{{ end }}
|
||||
{{ $authorImage:= "/assets/images/default-avatar.png" }}
|
||||
{{ if $author.image }}
|
||||
{{ $authorImage = $author.image }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq (printf "%T" .Params.author ) "maps.Params" }}
|
||||
{{ with .Params.author }}
|
||||
{{ if .image }}
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }}
|
||||
{{ end }}
|
||||
|
||||
{{ $backgroundImage:= "assets/images/default-background.jpg" }}
|
||||
{{ $backgroundImage:= "/assets/images/default-background.jpg" }}
|
||||
{{ if .Site.Params.background }}
|
||||
{{ $backgroundImage = .Site.Params.background }}
|
||||
{{ end }}
|
||||
|
||||
{{ $authorImage:= "assets/images/default-avatar.png" }}
|
||||
{{ $authorImage:= "/assets/images/default-avatar.png" }}
|
||||
{{ if $author.image }}
|
||||
{{ $authorImage = $author.image }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue