Fix the get author name partial to account for localized author names (#141)
This commit is contained in:
parent
32cd54d4cd
commit
9ac57313ff
1 changed files with 8 additions and 3 deletions
|
@ -1,7 +1,12 @@
|
||||||
|
{{/* Uses the top level site's config for a single author across all locales */}}
|
||||||
{{ $authorName:= site.Params.author.name }}
|
{{ $authorName:= site.Params.author.name }}
|
||||||
{{ if site.Data.site.author}}
|
|
||||||
{{ $authorName = site.Data.site.author.name }}
|
{{/* Overrides with the locale specifc author if provided */}}
|
||||||
{{ end}}
|
{{ if (index site.Data site.Language.Lang).author }}
|
||||||
|
{{ $authorName = (index site.Data site.Language.Lang).author.name }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* Lastly, overrides with the post specific author if provided */}}
|
||||||
{{ if eq (printf "%T" .Params.author ) "maps.Params" }}
|
{{ if eq (printf "%T" .Params.author ) "maps.Params" }}
|
||||||
{{ with .Params.author }}
|
{{ with .Params.author }}
|
||||||
{{ if .name }}
|
{{ if .name }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue