hook_test/layouts/partials/page_metadata_authors.html
2021-12-31 12:44:26 +01:00

18 lines
566 B
HTML

{{/* 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 }}