Swiftgram/docs/_includes/nav_docs.html

22 lines
609 B
HTML
Executable File

<nav class='toc'>
{% for section in site.data.nav_docs %}
<section>
<h3>{{ section.title }}</h3>
<ul>
{% for item in section.items %}
{% for doc in site.docs %}
{% assign item_url = item | prepend:"/docs/" | append:".html" %}
{% if doc.url == item_url %}
<li>
<a href={{item_url}}{% if page.url == item_url %} class="active"{% endif %}>
{{ doc.title }}
</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
</section>
{% endfor %}
</nav>