{% extends "base.html" %} {#- Render one nav section as sidenav groups: its direct pages/links under the section's own label, then each child section as a further group. -#} {%- macro sidenav_section(sec, label) -%} {%- set direct = sec.children | selectattr("is_section", "ne", true) | list -%} {%- if direct -%}
{{ label }}
{%- for child in direct %} {%- if child.is_link %} {{ child.title }} {%- else %} {{ child.title }} {%- endif %} {%- endfor %}
{%- endif -%} {%- for child in sec.children if child.is_section -%} {{ sidenav_section(child, child.title) }} {%- endfor -%} {%- endmacro -%} {% block container %} {%- set active_section = namespace(item=none) -%} {%- for item in nav %}{% if item.active %}{% set active_section.item = item %}{% endif %}{% endfor %}
Docs {%- for crumb in page.ancestors | reverse %} /{{ crumb.title }} {%- endfor %} /{{ page.title }}
{{ page.content }}
{%- if page.previous_page %}
← Previous
{{ page.previous_page.title }}
{%- else %}{% endif %} {%- if page.next_page %} {%- endif %}
{% endblock %}