<h4 class="d-block mb-3">Table of Contents</h4>
<ul class="m-0 ps-4">
    {% for toc_item in page.toc %}
    <li><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
    {% for toc_item_secondary in toc_item.children %}
    <li>
        <a href="{{ toc_item_secondary.url }}">{{ toc_item_secondary.title }}</a>
        {% if toc_item_secondary.children %}
        <ul class="m-0 ps-4">
            {% for toc_item_tertiary in toc_item_secondary.children %}
            <li>
                <a href="{{ toc_item_tertiary.url }}">{{ toc_item_tertiary.title }}</a>
            </li>
            {% endfor %}
        </ul>
        {% endif %}
    </li>
    {% endfor %}
    {% endfor %}
</ul>
