page_metadata_authors.html 579 B

123456789101112131415161718
  1. {{/* Display author list. */}}
  2. {{- $taxonomy := "authors" }}
  3. {{ with .Param $taxonomy }}
  4. {{ $link_authors := site.Params.link_authors | default true }}
  5. {{ range $index, $name_raw := . }}
  6. {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy .) -}}
  7. {{- $name := $profile_page.Title | default $name_raw -}}
  8. {{- if gt $index 0 }}, {{ end -}}
  9. <span>
  10. {{- if and $profile_page $link_authors -}}
  11. <a href="{{$profile_page.RelPermalink}}">{{$name}}</a>
  12. {{- else -}}
  13. {{$name}}
  14. {{- end -}}
  15. </span>
  16. {{- end -}}
  17. {{- end -}}