{# Documentation Navigation Component Displays full hierarchical sidebar navigation for documentation sites. Uses pre-computed NavTree for optimal performance. Variables: - page: Current page object (required) - show_nav_icons: Whether to show section icons (default: true) Features: - Hierarchical tree structure via NavTree API - Active page highlighting (automatic via NavNodeProxy) - Active trail marking (automatic via NavTreeContext) - Version-aware filtering (automatic via NavTreeCache) - Keyboard accessible - Section icons from frontmatter Usage: {% include 'partials/docs-nav.html' %} #} {# Control icon visibility - defaults to true #} {% set show_nav_icons = show_nav_icons if show_nav_icons is defined else true %} {# Check if page is autodoc - autodoc pages should use scoped navigation #} {% set is_autodoc = is_autodoc_page(page) if is_autodoc_page is defined else false %} {# Get root section for scoped navigation (autodoc sections have nav_root: true) #} {% set root_section = page._section.root if page._section and (is_autodoc or page._section.metadata.get('nav_root')) else none %}