docs/_includes/treebuilder.html

20 lines
831 B
HTML

{% assign topicFound="false" %}
{% for section in site.data.toc.horizontalnav %}
{% assign activeCSS = "" %}
{% if topicFound=="false" %}
{% 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 %}
<li id="{{ section.node }}"{{ activeCSS }}><a href="{{ section.path }}">{{ section.title }}</a></li>
{% endfor %}
{% if site.edge == true %}
<li id="stable-cta"><a href="/">Back to Stable docs</a></li>
{% else %}
<li id="edge-cta"><a href="/edge/">Try the CE Edge docs</a></li>
{% endif %}