1234567891011121314151617 |
- {{/* Uses the top level site's config for a single author across all locales */}}
- {{ $authorName:= site.Params.author.name }}
- {{/* Overrides with the locale specific author if provided */}}
- {{ 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" }}
- {{ with .Params.author }}
- {{ if .name }}
- {{ $authorName = .name }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ return $authorName }}
|