Fix sidebar navigation rendering

This commit is contained in:
thePR0M3TH3AN
2025-07-10 13:04:41 -04:00
parent 18e2f45f6a
commit d7c38a9326
2 changed files with 15 additions and 5 deletions

View File

@@ -1,9 +1,18 @@
{% macro renderNav(items) %}
<ul>
{% for item in items %}
<li>
<a href="{{ item.path }}">{{ item.page.title }}</a>
{% if item.children and item.children.length %}
{{ renderNav(item.children) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endmacro %}
<aside class="sidebar" id="sidebar">
<nav>
<ul>
{% for item in navigation %}
<li><a href="{{ item.path }}">{{ item.page.title }}</a></li>
{% endfor %}
</ul>
{{ renderNav(navigation) }}
</nav>
</aside>