hugo-book-theme/layouts/partials/docs/post-meta.html
2020-01-17 21:31:36 +01:00

21 lines
537 B
HTML

{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
{{ if or .Date .Params.tags }}
<div>
{{ with .Date}}
<h5>{{ .Format $dateFormat }}</h5>
{{ end }}
{{ range $term, $_ := .Site.Taxonomies }}
{{ with $list := index $.Params $term }}
<div>
{{ range $n, $single := $list }}{{ if $n }}, {{ end }}
{{ with $.Site.GetPage (printf "/%s/%s" $term $single | urlize) }}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- end }}
{{- end }}
</div>
{{ end }}
{{ end }}
</div>
{{ end }}