You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
858 B
HTML
34 lines
858 B
HTML
{{ $page := . }}
|
|
|
|
{{ $result := "" }}
|
|
|
|
{{ if $page.Params.authors }}
|
|
{{ $names := slice }}
|
|
|
|
{{ range $page.Params.authors }}
|
|
{{ if eq (printf "%T" .) "string" }}
|
|
{{ $names = $names | append (index site.Params.authors .).name }}
|
|
{{ else }}
|
|
{{ with .author }}
|
|
{{ $names = $names | append (index site.Params.authors .).name }}
|
|
{{ else }}
|
|
{{ $names = $names | append .name }}
|
|
{{ 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 }}
|