{%- for item in include.data -%} {%- if include.depth == 1 -%} {%- assign the_url = item.name | slugify | prepend: "/sitemap/#" -%} {%- else -%} {%- assign the_url = item.url -%} {%- endif -%} {{item.name}}{% comment %}{% if item.pages and include.depth > 1 %} {% include_cached icon.html name="chevron-right" %}{% endif %}{% endcomment %} {%- if include.depth>1 -%} {%- if item.pages %}{% assign newdepth = include.depth | plus: "1"%}{% include navlist.html data=item.pages depth=newdepth %}{% endif -%} {%- endif -%} {%- if include.depth==1 -%} {%- endif -%} {%- endfor -%}