hugo-toha/layouts/partials/helpers/get-author-name.html
Cristian Marquez Russo 8f2f18b34c
Update get-author-name.html (#61)
Changed default to the parameters in Config file for consistency
2020-08-27 18:20:49 +06:00

12 lines
347 B
HTML

{{ $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 }}
{{ if .name }}
{{ $authorName = .name }}
{{ end }}
{{ end }}
{{ end }}
{{ return $authorName }}