GoBlog/templates/posttax.gohtml

14 lines
508 B
Plaintext
Raw Normal View History

2020-11-01 17:37:21 +00:00
{{ define "posttax" }}
{{ $post := .Data }}
{{ $blog := .Blog }}
{{ range $i, $tax := $blog.Taxonomies }}
2020-12-07 21:30:26 +00:00
{{ $tvs := sort (ps $post $tax.Name) }}
2020-11-01 17:37:21 +00:00
{{ if gt (len $tvs) 0 }}
<p><b>{{ $tax.Title }}</b>:
{{ range $j, $tv := $tvs }}
2020-11-03 17:00:03 +00:00
<a class="p-category" rel="tag" href="{{ blogrelative $blog ( printf "/%s/%s" $tax.Name (urlize $tv) ) }}">{{ $tv }}</a>
2020-11-01 17:37:21 +00:00
{{ end }}
</p>
{{ end }}
{{ end }}
{{ end }}