I’ve been trying to create a section specific list of categories.
I have the following code that produces links to all categories from site content.
{{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
<li><a href="{{ .Permalink }}">{{ .Name }}</a></li>
{{ end }}
How can I display categories only from the current section? For example, on the list.html
page of the blog
section, I would like to display a list of only the categories that are added to content items in the blog section.