hey,
i have a taxonomy using tags.
in my sidebar i have a tag cloud.
I’m looking for a way to draw attention to my more recent, better written articles and away from the old stuff.
Is it possible to manually configure a set of tags and then reference those in the template? (so i could show those tops separately on top)
or perhaps to order tags by recency of content seen with said tag?
thanks.
So I got it pretty much working, in a bit of an ugly and manually maintained way, like so:
{{ $baseurl := .Site.BaseUrl }}
{{ $tax := .Site.Taxonomies}}
<h1 class="widget-title">Popular tags</h1>
<a href="{{$baseurl}}tags/monitoring">monitoring</a>
{{ $tax.tags.Count "monitoring" }}
<br/>
<a href="{{$baseurl}}tags/devops">devops</a>
{{ $tax.tags.Count "devops" }}
<br/>
<br/>
<h1 class="widget-title">Other tags</h1>
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
{{ if or (eq $name "devops") (eq $name "monitoring") }}
{{else}}
<a href="{{$baseurl}}tags/{{ $name | urlize }}">{{ $name }}</a>
{{ $tax.tags.Count $name }}
<br/>
{{ end }}
{{ end }}
of course this could be cleaner if i could drive this via an option in the config or something…