{# Override of the shadcn theme sidebar. Differences from the stock template: 1. The journey nav is iterated in declared order, so non-section pages (Base Camp, The Summit) keep their position relative to the camp sections instead of being hoisted into a single group at the top. This places "The Summit" after Camp 4 as authored in mkdocs.yml. 2. Each camp section renders as a collapsible group (button + chevron), expanded only when it contains the active page. This avoids the long always-expanded scroll of every camp's sub-pages at once. #} {% if nav|length > 1 %} {% if config.theme.topbar_sections %} {% set current = nav|active_section|attr('children') %} {% else %} {% set current = nav %} {% endif %} {% if not current %} {# when there is no active section, keep only the top level pages #} {% set current = nav|selectattr("is_page") %} {% endif %}
{% endif %}