Skip to content

Commit dcf7736

Browse files
Include H3 in docs TOC
1 parent ca9b59b commit dcf7736

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

templates/docs/document.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@ <h4 class="p-table-of-contents__header">On this page</h4>
118118
<nav class="p-table-of-contents__nav" aria-label="Table of contents">
119119
<ul class="p-table-of-contents__list">
120120
{% for heading in document.headings_map %}
121-
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#{{ heading.heading_slug }}">{{ heading.heading_text }}</a></li>
121+
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#{{ heading.heading_slug }}">{{ heading.heading_text }}</a></li>
122+
{% if heading.children %}
123+
<ul class="p-table-of-contents__list">
124+
{% for child in heading.children %}
125+
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#{{ child.heading_slug }}">{{ child.heading_text }}</a></li>
126+
{% endfor %}
127+
</ul>
128+
{% endif %}
122129
{% endfor %}
123130
</ul>
124131
</nav>

0 commit comments

Comments
 (0)