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.
paige-hugo/layouts/partials/paige-func-authors.html

18 lines
543 B
HTML

{{ $result := "" }}
{{ if .Params.authors }}
{{ $names := slice }}
{{ range .Params.authors }}
{{ $names = $names | append (index site.Params.authors . "name" | default .) }}
{{ 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 }}