{{ if (isset .Params "authors") }}
{{ $authsCount := .Params.authors | len }}
{{ $commaCount := sub $authsCount 2 }}
{{ range $i, $author := .Params.authors -}}
{{ $author }}{{ if le $i $commaCount }},{{ end }}
{{ end }}
{{ else }}
{{ .Params.author }}
{{ end }}