Rename func-authors.html to authors.html

This commit is contained in:
Will Faught
2023-02-22 23:14:41 -08:00
parent 21143b8756
commit a3dc86ddba
5 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,33 @@
{{ $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 }}