page_metadata_authors.html 896 B

123456789101112131415161718192021222324
  1. {{/* Display author list. */}}
  2. {{- $taxonomy := "authors" }}
  3. {{ if .Param $taxonomy }}
  4. {{ range $index, $value := (.GetTerms $taxonomy) }}
  5. {{- /* Highlight the author's name? */ -}}
  6. {{- $highlight_name := .Page.Params.highlight_name | default false -}}
  7. {{- if gt $index 0 }}, {{ end -}}
  8. <span {{ if $highlight_name }}class="author-highlighted"{{end}}>
  9. {{/* Effectively check the page's `_build` option as `_build` is not exposed in Hugo's Page object. */}}
  10. {{- if .RelPermalink -}}
  11. <a href="{{.RelPermalink}}">{{.LinkTitle}}</a>
  12. {{- else -}}
  13. {{ .LinkTitle }}
  14. {{- end -}}
  15. </span>
  16. {{- if isset $.Params "author_notes" -}}
  17. {{- with (index $.Params.author_notes $index) -}}
  18. <i class="author-notes fas fa-info-circle" data-toggle="tooltip" title="{{.}}"></i>
  19. {{- end -}}
  20. {{- end -}}
  21. {{- end -}}
  22. {{- end -}}