Skip to content

Commit

Permalink
Merge pull request #259 from canonical/WD-17310
Browse files Browse the repository at this point in the history
WD-17310 Include H3 in docs TOC
  • Loading branch information
muhammad-ali-pk authored Dec 19, 2024
2 parents 5d2ba6d + ecd8be8 commit bef60c5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion templates/docs/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ <h4 class="p-table-of-contents__header">On this page</h4>
<nav class="p-table-of-contents__nav" aria-label="Table of contents">
<ul class="p-table-of-contents__list">
{% for heading in document.headings_map %}
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#{{ heading.heading_slug }}">{{ heading.heading_text }}</a></li>
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#{{ heading.heading_slug }}">{{ heading.heading_text }}</a></li>
{% if heading.children %}
<ul class="p-table-of-contents__list">
{% for child in heading.children %}
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#{{ child.heading_slug }}">{{ child.heading_text }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
</nav>
Expand Down

0 comments on commit bef60c5

Please sign in to comment.