diff --git a/layouts/post/single.html b/layouts/post/single.html index a2893e2..5cde8e9 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -46,14 +46,19 @@
- {{ $authors := .Params.author | default .Params.authors }} + {{ $authors := .Params.author | default .Params.authors | default .Site.Params.author | default .Site.Params.authors }} + {{ if not (reflect.IsSlice $authors) }} + {{ $authors = slice $authors }} + {{ end }} + {{ $authorsData := index $.Site.Data.authors .Site.LanguageCode | default $.Site.Data.authors }} + {{ i18n "post.written_by" }} {{ if $authors }} {{ range $i, $author := $authors }} - {{ with $.Site.Data.authors }} + {{ with $authorsData }} {{ with (index . $author) }} {{ if .url }} {{ .name }}