Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2020-09-18 11:58:38 +0300
committerJimmy Cai <jimmehcai@gmail.com>2020-09-18 11:58:38 +0300
commitb2a1afd744f84a459934043d80548dd1b0a34365 (patch)
treec970ffc131c3436a9dbfadaea21786889c3e2793
parentd29272782153fc16cfbc9c72ed638b8fe32a57f6 (diff)
feat(tag cloud): add support for custom taxonomy link
-rw-r--r--layouts/partials/widget/tag-cloud.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/layouts/partials/widget/tag-cloud.html b/layouts/partials/widget/tag-cloud.html
index 1fa8efe..a29b382 100644
--- a/layouts/partials/widget/tag-cloud.html
+++ b/layouts/partials/widget/tag-cloud.html
@@ -8,9 +8,10 @@
<div class="tagCloud-tags">
{{ range first .Site.Params.widgets.tagCloud.limit $tags }}
- <a href="{{ printf `tags/%s` (.Term | urlize) | relLangURL }}" class="font_size_{{ .Count }}">
- {{ .Term | humanize }}
- </a>
+ {{ $term := $.Site.GetPage (printf "/tags/%s" .Term) }}
+ <a href="{{ $term.Permalink }}" class="font_size_{{ .Count }}">
+ {{ $term.Title | humanize }}
+ </a>
{{ end }}
</div>
</section> \ No newline at end of file