<nav class="bd-links bd-docs-nav" aria-label="Main navigation">
  <div class="bd-toc-item active">
    <!-- Specify a startdepth of 0 instead of default of 1 -->
    {{ generate_toctree_html("sidebar", startdepth=0, maxdepth=4, collapse=True, includehidden=True, titles_only=True) }}
  </div>
</nav>
