{%- assign pages_list = site.html_pages | sort:"nav_order" -%} {%- for node in pages_list -%} {%- unless node.nav_exclude -%} {%- if node.parent == nil -%}
  • {%- if page.parent == node.title -%} {%- assign first_level_url = node.url | absolute_url -%} {%- endif -%} {{ node.title }} {%- if node.toc_list -%} {% include toc.html sanitize=true html=node.content class="navigation-list-child-list" item_class="navigation-list-item" anchor_class="navigation-list-link" %} {%- endif -%} {%- if node.has_children and (node.always_show_children or page.url == node.url or page.parent == node.title) -%} {%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
      {%- for child in children_list -%}
    • {%- if page.url == child.url or page.parent == child.title -%} {%- assign second_level_url = child.url | absolute_url -%} {%- endif -%} {{ child.title }} {%- if child.has_children or page.url == node.url -%} {%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
        {%- for grand_child in grand_children_list -%}
      • {{ grand_child.title }}
      • {%- endfor -%}
      {%- endif -%} {% if page.url == child.url %} {% include toc.html html=content sanitize=true class="nav-list" item_class="nav-list-item" anchor_class="nav-list-link" h_min=1 h_max=2 %} {% endif %}
    • {%- endfor -%}
    {%- endif -%} {% if page.url == node.url %} {% include toc.html html=content sanitize=true class="nav-list" item_class="nav-list-item" anchor_class="nav-list-link" h_min=1 h_max=2 %} {% endif %}
  • {%- endif -%} {%- endunless -%} {%- endfor -%}