Fix tags and categories using GetTerms
See [documentation](https://gohugo.io/templates/taxonomy-templates/#display-a-single-piece-of-contents-taxonomies)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
{{ $tags := .Site.Taxonomies.tags.ByCount }}
|
||||
|
||||
<section class="widget tagCloud">
|
||||
<div class="widget-icon">
|
||||
{{ (resources.Get "icons/tag.svg").Content | safeHTML }}
|
||||
@@ -7,10 +5,9 @@
|
||||
<h1 class="widget-title">{{ T "widgetTagCloudTitle" }}</h1>
|
||||
|
||||
<div class="tagCloud-tags">
|
||||
{{ range first .Site.Params.widgets.tagCloud.limit $tags }}
|
||||
{{ $term := $.Site.GetPage (printf "/tags/%s" .Term) }}
|
||||
<a href="{{ $term.Permalink }}" class="font_size_{{ .Count }}">
|
||||
{{ $term.Title | humanize }}
|
||||
{{ range first .Site.Params.widgets.tagCloud.limit .Site.Taxonomies.tags.ByCount }}
|
||||
<a href="{{ .Page.Permalink }}" class="font_size_{{ .Count }}">
|
||||
{{ .Page.Title | humanize }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user