{% for toc_item in page.toc %} {# #} {% if toc_item.children %} {% endif %} {% endfor %}