Fix the single template to use the authors avatar correctly (#107)
* Fix the single template to use the authors avatar correctly * Replace absURL with relURL and .Site.X with site.X Co-authored-by: Emruz Hossain <emruz@appscode.com>
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{ $authorName:= .Site.Params.author.name }}
|
||||
{{ if .Site.Data.site.author}}
|
||||
{{ $authorName = .Site.Data.site.author.name }}
|
||||
{{ $authorName:= site.Params.author.name }}
|
||||
{{ if site.Data.site.author}}
|
||||
{{ $authorName = site.Data.site.author.name }}
|
||||
{{ end}}
|
||||
{{ if eq (printf "%T" .Params.author ) "maps.Params" }}
|
||||
{{ with .Params.author }}
|
||||
|
||||
Reference in New Issue
Block a user