I want to create a terms.html
under ~/themes/<themename>/layouts/_default
that shows all terms of a taxonomy based on a url like this example.com/tag/golang
. Tag would be Hugo’s default taxonomy and golang it’s term.
This script from the docs lists all terms of a taxonomy, but it’s static:
<ul id="all-tags">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<li><a href="/tags/{{ $name | urlize }}">{{ $name }}</a></li>
{{ end }}
</ul>
Is it possible to extract the taxonomy from the url?