Skip to content

Commit b8f24f4

Browse files
committed
Update the toc setup in html to archive a proper toc at sidebar
1 parent 125b914 commit b8f24f4

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

docs/_includes/toc.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/_layouts/default.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ <h2>Quick Navigation</h2>
1818
{% if item.toc %}
1919
<button onclick="toggleTOC('{{ item.title | replace: ' ', '-' }}')">Details</button>
2020
<div id="toc-{{ item.title | replace: ' ', '-' }}" class="toc-content hidden">
21-
{% include toc.html %}
21+
<ul>
22+
{% for heading in page.content | toc %}
23+
<li><a href="#{{ heading.id }}">{{ heading.text }}</a></li>
24+
{% endfor %}
25+
</ul>
2226
</div>
2327
{% endif %}
2428
</li>

0 commit comments

Comments
 (0)