Quick Links

{%- for item in site.data.sidebar -%} {%- if item.children -%}
{{ item.title | escape }}
{%- for child in item.children -%} {%- if child.children -%}
{{ child.title | escape }}
{%- for grandchild in child.children -%} {{ grandchild.title | escape }} {%- endfor -%}
{%- else -%} {{ child.title | escape }} {%- endif -%} {%- endfor -%}
{%- else -%} {%- assign is_index_page = false -%} {%- assign dir_name = "" -%} {%- if item.url != "/" -%} {%- assign url_normalized = item.url | remove: "/index.html" -%} {%- if url_normalized != "/" -%} {%- assign url_parts = url_normalized | split: "/" -%} {%- assign dir_name = "" -%} {%- for part in url_parts -%} {%- if part != "" -%} {%- if dir_name == "" -%} {%- assign dir_name = part -%} {%- else -%} {%- assign dir_name = dir_name | append: "/" | append: part -%} {%- endif -%} {%- endif -%} {%- endfor -%} {%- if dir_name != "" -%} {%- assign is_index_page = true -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- if is_index_page -%} {%- assign dir_path = dir_name | append: "/" -%} {%- assign index_file = dir_name | append: "/index.md" -%} {%- assign has_children = false -%} {%- assign child_pages = site.pages | sort: "path" -%} {%- for child_page in child_pages -%} {%- unless child_page.path contains ".template" -%} {%- if child_page.path contains dir_path and child_page.path contains ".md" and child_page.path != index_file -%} {%- assign has_children = true -%} {%- endif -%} {%- endunless -%} {%- endfor -%} {%- if has_children -%}
{{ item.title | escape }}
{%- for child_page in child_pages -%} {%- unless child_page.path contains ".template" -%} {%- if child_page.path contains dir_path and child_page.path contains ".md" and child_page.path != index_file -%} {{ child_page.title | default: child_page.name | escape }} {%- endif -%} {%- endunless -%} {%- endfor -%}
{%- else -%} {{ item.title | escape }} {%- endif -%} {%- else -%} {{ item.title | escape }} {%- endif -%} {%- endif -%} {%- endfor -%}