<ul class="d-flex blog_filter p-0 w-100 justify-content-around flex-wrap">
{% for category in categories %}
{% set postCount = category.post_count %}
<li {% if category.slug == currentCategorySlug %}class="active"{% endif %}>
{% if category.url != 'spam' %}
<a href="{{ category.url }}">{{
category.name }}</a>
{% endif %}
{% if category.children|length > 0 %}
<ul>
{% partial
SELF ~ "::items"
categories=category.children
currentCategorySlug=currentCategorySlug
%}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>