2022-02-04 14:51:03 +00:00
|
|
|
<ul>
|
|
|
|
{% for doc in site.docs %}
|
|
|
|
{% assign pathparts = doc.path | split: '/' %}
|
|
|
|
{% assign dir = pathparts[1] %}
|
|
|
|
|
|
|
|
{% if pathparts.size > 3 %}
|
|
|
|
{% assign subdir = pathparts[2] %}
|
|
|
|
{% unless site.data.sections[subdir] %}
|
|
|
|
{% assign subsection = subdir %}
|
|
|
|
{% else %}
|
|
|
|
{% assign subsection = site.data.sections[subdir].title %}
|
|
|
|
{% endunless %}
|
|
|
|
{% else %}
|
|
|
|
{% assign subdir = "NONE" %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% assign section = site.data.sections[dir].title %}
|
|
|
|
{% unless section %}
|
|
|
|
{% assign section = dir %}
|
|
|
|
{% endunless %}
|
|
|
|
|
|
|
|
{% if doc.previous %}
|
|
|
|
{% assign prevpathparts = doc.previous.path | split: '/' %}
|
|
|
|
{% assign prevdir = prevpathparts[1] %}
|
|
|
|
|
|
|
|
{% if prevpathparts.size > 3 %}
|
|
|
|
{% assign prevsubdir = prevpathparts[2] %}
|
|
|
|
{% else %}
|
|
|
|
{% assign prevsubdir = "NONE" %}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% assign prevdir = "NONE" %}
|
|
|
|
{% assign prevsubdir = "NONE" %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if subdir != prevsubdir and prevsubdir != "NONE" %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if dir != prevdir %}
|
|
|
|
{% if prevdir != "NONE" %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
<li>{{section}}</li>
|
|
|
|
<ul>
|
|
|
|
|
2022-02-04 17:11:00 +00:00
|
|
|
{% endif %}
|
2022-02-04 14:51:03 +00:00
|
|
|
|
2022-02-04 17:11:00 +00:00
|
|
|
{% if subdir != "NONE" and subdir != prevsubdir %}
|
2022-02-04 14:51:03 +00:00
|
|
|
<li>{{subsection}}</li>
|
|
|
|
<ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if doc.url != page.url %}
|
2022-02-04 17:11:00 +00:00
|
|
|
<li><a href="{{site.baseurl}}{{doc.url}}">{{doc.title}}</a></li>
|
2022-02-04 14:51:03 +00:00
|
|
|
{% else %}
|
|
|
|
<li class="active-nav">{{doc.title}}</li>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% unless doc.next %}
|
|
|
|
</ul>
|
|
|
|
{% if prevsubdir != "NONE" %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endunless %}
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|