|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
{{ $result := "" }}
|
|
|
|
|
|
|
|
|
|
{{ if .Params.authors }}
|
|
|
|
|
{{ $names := slice }}
|
|
|
|
|
|
|
|
|
|
{{ range .Params.authors }}
|
|
|
|
|
{{ if eq (printf "%T" .) "string" }}
|
|
|
|
|
{{ $names = $names | append (index site.Params.authors .).name }}
|
|
|
|
@ -12,14 +14,18 @@
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ $result = delimit $names ", " }}
|
|
|
|
|
{{ else if .Site.Params.authors }}
|
|
|
|
|
{{ $names := slice }}
|
|
|
|
|
|
|
|
|
|
{{ range $k, $v := .Site.Params.authors }}
|
|
|
|
|
{{ if eq $v.default true }}
|
|
|
|
|
{{ $names = $names | append $v.name }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ $result = delimit $names ", " }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ return $result }}
|
|
|
|
|