<!-- block sidebar -->
<div class="navbar-expand-md" role="complementary">
    {% macro toc_item(item) %}
        {%- if item.level <= config.theme.navigation_depth %}
            <li class="nav-item" data-bs-level="{{ item.level }}"><a href="{{ item.url }}" class="nav-link">{{ item.title }}</a>
              <ul class="nav flex-column">
                {%- for child in item.children %}
                    {{- toc_item(child) }}
                {%- endfor %}
              </ul>
            </li>
        {%- endif %}
    {%- endmacro %}
    <div class="sidebar navbar-collapse collapse card">
        <ul class="nav flex-column">
        {%- for item in page.toc %}
            {{ toc_item(item) }}
        {%- endfor %}
        </ul>
    </div>
</div>
<!-- endblock -->
