page_metadata_authors.html 604 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, $value := . }}
  6. {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy (. | urlize)) -}}
  7. {{- $name := $profile_page.Params.name | default ($value|markdownify) -}}
  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 -}}