Fixed tags display on posts

This commit is contained in:
Francesco 2024-06-02 11:44:18 +02:00
parent 4282cf059e
commit d329f19ff8

View File

@ -35,19 +35,18 @@
{{ if .Param "showTags" }} {{ if .Param "showTags" }}
{{ $taxonomy := "tags" }} {{ $taxonomy := "tags" }}
{{ with .Param $taxonomy }} {{ with .Param $taxonomy }}
{{ $last := sub (. | len) 1 }}
<div class="single-tags"> <div class="single-tags">
{{ range $index, $tag := . }} {{ range $index, $tag := . }}
{{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}} {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}}
<span> <span>
<a href="{{ .Permalink }}">#{{ $tag | urlize }}</a> <a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
</span> </span>
{{ end }} {{ end }}
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}