diff --git a/layouts/post/list.html b/layouts/post/list.html index 824b995..b88bdd9 100644 --- a/layouts/post/list.html +++ b/layouts/post/list.html @@ -10,9 +10,20 @@
{{ .Date.Format "Mon Jan 2, 2006" }} {{ i18n "authored_by" }} - - {{ .Params.author | default .Site.Params.author }} - + {{ if .Params.authors }} + {{ $s := newScratch }} + {{ $s.Set "len" (len .Params.authors) }} + {{ $s.Add "len" -1 }} + {{ range $idx, $author := .Params.authors -}} + + {{ $author | default $.Site.Params.author }} + {{ if ne $idx ($s.Get "len") }}, {{end}} + {{- end }} + {{ else }} + + {{ .Params.author | default .Site.Params.author }} + + {{ end }}