forked from ev3dev/ev3dev.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsite-map.html
More file actions
25 lines (24 loc) · 708 Bytes
/
site-map.html
File metadata and controls
25 lines (24 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
title: Site Map
---
{% assign sorted_pages=site.pages | sort: 'url' %}
{% assign last_depth=0 %}
{% for page in sorted_pages %}
{% assign paths=page.url | split: '/' %}
{% assign depth=paths | size %}
{% if depth > last_depth %}
<ul>
{% endif %}
{% if depth < last_depth %}
{% for i in (depth..last_depth) %}
{% if forloop.last != true %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
{% assign page_name=paths | last %}
{% if depth > 0 and page_name != 'site-map' %}
<li><a href="{{page.url}}">{{ page.title }}</a> ({{ page_name }})</li>
{% endif %}
{% assign last_depth=depth %}
{% endfor %}