mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 00:20:28 +01:00
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)
28 lines
855 B
HTML
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>
|