Skip to content

Commit 2901d99

Browse files
committed
Update the html to try achieve the side bar navigation
1 parent 8dc7e8b commit 2901d99

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/_layouts/default.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,22 @@
1414
</main>
1515

1616
</body>
17+
<aside class="sidebar">
18+
<h2>Quick Navigation</h2>
19+
<ul>
20+
{% for item in site.sidebar %}
21+
<li>
22+
<a href="{{ item.url }}">{{ item.title }}</a>
23+
{% if item.toc %}
24+
<ul>
25+
{% for heading in site.pages | where:"path", item.url | map:"headings" %}
26+
<li><a href="{{ heading.url }}">{{ heading.text }}</a></li>
27+
{% endfor %}
28+
</ul>
29+
{% endif %}
30+
</li>
31+
{% endfor %}
32+
</ul>
33+
</aside>
1734

1835
</html>

0 commit comments

Comments
 (0)