{% block menu %}
{% set global = get_section(path="_index.md") %} {# Always set a global section to `_index.md` #}
{# List all L1 sections #}
{% if global.subsections %}
{% for s in global.subsections %}
{% set top = get_section(path=s) %} {# Set the L1 section #}
{% set current = section %} {# Set the section to a varibale, because `section.path` can not be used when nested #}
{% if section.ancestors[1] %} {# Check if ancestor exists (and therefore we are not in L1) #}
{% set current = get_section(path=section.ancestors[1]) %} {# Set the variable to the L1 ancestor #}
{% endif %}