{% import "macros.twig" as helpers %}

{% for name, documents in categories %}
    {% if name|lower != 'docs' %}
        <h3 class="category-title">{{ name|title }}</h3>
    {% endif %}
    <ul class="nav flex-column">
        {% for document in documents %}
            {{ helpers.menu_entry(
                url('documentation_show', { path: document.metadata.path }),
                document.metadata.title,
                fa(document.metadata.icon ?? 'document', document.metadata.iconType ?? 'regular'),
                path == document.metadata.path
            ) }}
        {% endfor %}
    </ul>
{% endfor %}