mirror of https://github.com/jlelse/GoBlog
15 lines
569 B
Plaintext
15 lines
569 B
Plaintext
{{ define "posttax" }}
|
|
{{ $post := .Data }}
|
|
{{ $blog := .Blog }}
|
|
{{ range $i, $tax := $blog.Taxonomies }}
|
|
{{ $tvs := sort (ps $post $tax.Name) }}
|
|
{{ if $tvs }}{{ if not (eq (len $tvs) 0) }}
|
|
<p>
|
|
<b>{{ mdtitle $tax.Title }}</b>:
|
|
{{ range $j, $tv := $tvs }}
|
|
<a class="p-category" rel="tag" href="{{ $blog.RelativePath ( printf "/%s/%s" $tax.Name (urlize $tv) ) }}">{{ mdtitle $tv }}</a>
|
|
{{ end }}
|
|
</p>
|
|
{{ end }}{{ end }}
|
|
{{ end }}
|
|
{{ end }} |