{# ------------------------------------------------------------------------- Page context header Finds the currently active top-level section and renders: - section badge - section-local subnavigation Falls back to a generic page context if no active section is found. ------------------------------------------------------------------------- #} {% set ns = namespace(active_section=None) %} {% if nav %} {% for item in nav %} {% if item.active and item.children %} {% set ns.active_section = item %} {% endif %} {% endfor %} {% endif %}
{% if ns.active_section %} {{ ns.active_section.title }} {% else %} Docs Hub {{ page.title }} {% endif %}