diff options
author | Jimmy Cai <jimmehcai@gmail.com> | 2020-09-18 11:58:38 +0300 |
---|---|---|
committer | Jimmy Cai <jimmehcai@gmail.com> | 2020-09-18 11:58:38 +0300 |
commit | b2a1afd744f84a459934043d80548dd1b0a34365 (patch) | |
tree | c970ffc131c3436a9dbfadaea21786889c3e2793 | |
parent | d29272782153fc16cfbc9c72ed638b8fe32a57f6 (diff) |
feat(tag cloud): add support for custom taxonomy link
-rw-r--r-- | layouts/partials/widget/tag-cloud.html | 7 |
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 |