mirror of https://github.com/jlelse/GoBlog
List taxonomy values below post
This commit is contained in:
parent
4b066d5ea1
commit
4cc33c91db
|
@ -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 }}
|
||||
|
||||
|
|
Loading…
Reference in New Issue