Hello all,
I’ve been trying to built a navigation menu for my (photo)blog (repo here). I have the correct (working) tags, but I can’t seem to figure out how to order and limit them like I want.
Right now, I have a partial that reads as follows:
<nav class="nav">
<ul class="series">
<!-- Range over series -->
{{ range $name, $taxonomy := .Site.Taxonomies.series }}
<li><a href="/series/{{ $name | urlize }}">{{ $name }}</a></li>
{{ end }}
</ul>
<ul class="tags">
<!-- Range over top 5 tags -->
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<li><a href="/tags/{{ $name | urlize }}">{{ $name }}</a></li>
{{ end }}
</ul>
</nav>
How would I go about ordering these? Sorting the series chronologically (the newest series first) and the tags by (the five) most used ones?