Is the current single term from tag.html available in any variable?

I’m working on customizing the tag.html template which loads for pages with the URL http://localhost:1313/tags/metrics/ here the word metrics is the term

Using a loop like below I can output all content which has the metrics tag.

  {{ range .Site.Taxonomies.tags.metrics }}
    <li><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></li>
  {{ end }}

While on the `tag.html` template how can I loop over all content without having to set `.metrics` in the range. How can it be set dynamically based on the current term being viewed. Is there anything way to loop over the content?


Something ala

{{ range (index .Site.Taxonomies.tags "metrics") }}

Replace the string with a variable.

Thanks @bep I just came up with something similar using the .Title and putting it through urlize is this a safe method. I guess there’s no direct access to the current term name just the taxonomies for now. Thanks again

{{ $theterm :=.Title | urlize }}

    {{ range $key, $taxonomy := .Site.Taxonomies.tags }}
        {{ if eq $key $theterm }}

            {{ range $taxonomy.Pages }}
            {{ end }}

        {{ end }}
    {{ end }}