forked from docker/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtreebuilder.html
More file actions
23 lines (23 loc) · 1.1 KB
/
Copy pathtreebuilder.html
File metadata and controls
23 lines (23 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{% assign topicFound="false" %}
{% for section in site.data.toc.horizontalnav %}
{% assign activeCSS = "" %}
{% if topicFound=="false" %}
{% if section.node == "glossary" %}
{% capture leftnav %}{% for entry in site.data.glossary %}
<li><a href="/glossary/?term={{ entry[0] }}">{{ entry[0] }}</a></li>{% endfor %}{% endcapture %}
{% if page.url == "/glossary/" %}
{% assign topicFound = "true" %}
{% capture leftnav %}<li><a href="/glossary/" class="active currentPage">Glossary Home</a></li>{{ leftnav }}{% endcapture %}
{% endif %}
{% else %}
{% assign tree = site.data.toc[section.node] %}
{% capture thisSection %}{% include tree.html %}{% endcapture %}
{% if section.path == page.url or thisSection contains "active currentPage" %}
{% capture leftnav %}{{ thisSection }}{% endcapture %}
{% capture activeCSS %} class="active"{% endcapture %}
{% assign topicFound="true" %}
{% endif %}
{% endif %}
{% endif %}
<li id="{{ section.node }}"{{ activeCSS }}><a href="{{ section.path }}">{{ section.title }}</a></li>
{% endfor %}