<nav class="bd-links bd-docs-nav" aria-label="Main">
    <div class="bd-toc-item navbar-nav active">
        {% if theme_home_page_in_toc == True %}
        {#- This mimics the pydata theme list style so we can append an extra item at the top #}
        <ul class="nav bd-sidenav bd-sidenav__home-link">
            <li class="toctree-l1{% if pagename == root_doc %} current active{% endif %}">
                <a class="reference internal" href="{{ pathto(root_doc) }}">
                    {{ root_title }}
                </a>
            </li>
        </ul>
        {% endif -%}

        {# Ref: https://github.com/pydata/pydata-sphinx-theme/blob/ebf7f704879a1cdc6016d6111062103353ac7677/src/pydata_sphinx_theme/__init__.py#L302 #}
        {{- generate_toctree_html(
            startdepth=0,
            kind="sidebar",
            maxdepth=theme_max_navbar_depth|int,
            collapse=theme_collapse_navbar|tobool,
            includehidden=True,
            titles_only=True,
            show_nav_level=theme_show_navbar_depth|int) }}
    </div>
</nav>
