react/docs/_includes/nav_docs.html
Paul O’Shannessy 3be6083ea4 Autogen the docs nav
This is still the same amount of duplication, except way easier to
parse. Docs nav now lives in `_config.yml` and you must restart jekyll
to see changes to that list (since config is only read at jekyll launch)
2013-07-16 17:24:41 -07:00

28 lines
855 B
HTML

<div class="nav-docs">
{% for section in site.nav_docs_sections %}
<div class="nav-docs-section">
<h3>{{ section.title }}</h3>
<ul>
{% for item in section.items %}
<li>
<a href="/react/docs/{{ item.id }}.html"{% if page.id == item.id %} class="active"{% endif %}>
{{ item.title }}
</a>
{% if item.subitems %}
<ul>
{% for subitem in item.subitems %}
<li>
<a href="/react/docs/{{ subitem.id }}.html"{% if page.id == subitem.id %} class="active"{% endif %}>
{{ subitem.title }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>