{# Recursive: nav depth is unbounded, so a section includes this same template for each of its children. The inner `for` rebinds `nav_item` in loop scope, which is what makes the recursion work (same trick as mkdocs-basic-theme). #} {%- if nav_item.children %}