{#- Shared macros. Import with: {% import "partials/macros.html" as m with context %} -#} {%- macro section_index(section) -%} {#- A section whose first child is its index.md links to that page. -#} {%- set first = section.children[0] if section.children else None -%} {%- if first and first.is_page and first.file and first.file.name == 'index' -%}{{ first }}{%- endif -%} {%- endmacro -%} {%- macro nav_tree(items, depth) -%}