#140, Use new GetTerms function to fix tag titles

This commit is contained in:
Alex Shpak
2020-03-19 22:00:45 +01:00
parent 0d1ba29999
commit a3059fe4f7
10 changed files with 8 additions and 14 deletions
+4 -6
View File
@@ -3,13 +3,11 @@
<h5>{{ .Format $dateFormat }}</h5>
{{ end }}
{{ range $term, $_ := .Site.Taxonomies }}
{{ with $list := $.Param $term }}
{{ range $taxonomy, $_ := .Site.Taxonomies }}
{{ with $terms := $.GetTerms $taxonomy }}
<div>
{{ range $n, $single := $list }}{{ if $n }}, {{ end }}
{{- with $.Site.GetPage (printf "/%s/%s" $term $single | urlize) }}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- end }}
{{ range $n, $term := $terms }}{{ if $n }}, {{ end }}
<a href="{{ $term.RelPermalink }}">{{ $term.Title }}</a>
{{- end }}
</div>
{{ end }}