List taxonomy values below post

This commit is contained in:
Jan-Lukas Else 2020-09-01 19:08:57 +02:00
parent 4b066d5ea1
commit 4cc33c91db
1 changed files with 12 additions and 0 deletions

View File

@ -10,6 +10,18 @@
<div class=e-content>{{ md . }}</div>
{{ end }}
</article>
{{ $taxonomies := blog.Taxonomies }}
{{ $post := . }}
{{ range $i, $tax := $taxonomies }}
{{ $tvs := ps $post $tax.Name }}
{{ if gt (len $tvs) 0 }}
<p>In <b>{{ $tax.Title }}</b>:
{{ range $j, $tv := $tvs }}
<a href="/{{ $tax.Name }}/{{ urlize $tv }}">{{ $tv }}</a>
{{ end }}
</p>
{{ end }}
{{ end }}
</main>
{{ end }}