hook_test/themes/academia-hugo/layouts/partials/page_metadata_authors.html

18 lines
566 B
HTML
Raw Permalink Normal View History

2021-12-31 12:44:26 +01:00
{{/* Display author list. */}}
{{ $taxonomy := "authors" }}
{{ with .Param $taxonomy }}
{{ range $index, $value := . }}
{{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy (. | urlize)) -}}
{{- $name := $profile_page.Params.name | default ($value|markdownify) -}}
{{- if gt $index 0 }}, {{ end -}}
<span itemprop="author name" itemtype="http://schema.org/Person">
{{- with $profile_page -}}
<a href="{{.RelPermalink}}">{{$name}}</a>
{{- else -}}
{{$name}}
{{- end -}}
</span>
{{- end -}}
{{ end }}