Fix post_tags partial

Fixes #20

I tried to follow the Hugo documentation example for taxonomy templates,
but it should not be trusted right now, in this particular example,
at least.
This commit is contained in:
vimux 2019-11-30 10:46:54 -05:00
parent 6cc4ac4218
commit 1b73262d85
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34

View file

@ -2,8 +2,9 @@
{{- with .Param $taxo }}
<div class="post__tags">
{{- range . }}
{{- $name := . -}}
{{- with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
{{- $url := urls.Parse (. | urlize) -}}
{{- $path := $url.Path -}}
{{- with $.Site.GetPage (printf "/%s/%s" $taxo $path) }}
<a class="post__tag btn" href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- end }}
{{- end }}