Skip to content

Commit

Permalink
Merge pull request #305 from canonical/WD-17313
Browse files Browse the repository at this point in the history
WD-17313 Include H3 in docs TOC
  • Loading branch information
muhammad-ali-pk authored Dec 19, 2024
2 parents e9299cd + 653e5c2 commit 6a89715
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions templates/docs/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,15 @@ <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>
{% endfor %}
<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>
</div>
Expand Down

0 comments on commit 6a89715

Please sign in to comment.