summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKian Kasad <kian@kasad.com>2020-12-10 21:58:09 -0800
committerGitHub <noreply@github.com>2020-12-11 11:28:09 +0530
commit5e40132673ec75e0d311d44d1fc84354f600aab3 (patch)
treea4d24aa733fd47a6786e685ec9a1890b904a6300
parent9c09564590d58e4d442a16468a5e6bd0bbcc131e (diff)
single: add support for custom taxonomy URLs (#125)
* fix URLs of tags in tag lists * use recommended code by hugo for tag list generator * https://gohugo.io/templates/taxonomy-templates/#example-list-tags-in-a-single-page-template * closes: #113
-rw-r--r--layouts/_default/single.html5
1 files changed, 2 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index e46d05f..b74a0c9 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -47,9 +47,8 @@
<footer class="post-footer">
{{- if .Params.tags }}
<ul class="post-tags">
- {{- range .Params.tags }}
- {{- $href := print (absLangURL "tags/") (urlize .) }}
- <li><a href="{{ $href }}">{{ . }}</a></li>
+ {{- range ($.GetTerms "tags") }}
+ <li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
{{- end }}