Currently, I am trying to create a filter list that responds to some javascript. The js part is fine, I have some similar yet smaller loops that are working.
Basically, the idea is the got a working html-link that has a href-value different to the text displayed. As all my filter links are in lowercase and the the filter option contain more than one word, I wanted to create a nested (?) yaml front matter.
but it also depends on what all else you have under filters - if this is it, then I think you can drop the category part.
I think your liquid also needs help, you have 2 for loops - not sure why, your output isn’t what I would expect.
I think it would be more like:
<ul class="categories container">
{% for item in page.filters.category %}
<li><a href="#{{ item.link }}">{{ item.name }}</a></li>
{% endfor %}
</ul>
that is untested, probably not perfect, and it also depends on what the yaml really is - is it filters, or category (careful with that word as it is a thing on its own).
The link above has great examples, and just about all use cases.