{%- def "render_toc" %} {%- for node in nodes %}
  • {% if node.title %}${node.title}{% endif %} {%- if node.children %}{% call "render_toc" with nodes=node.children, level=level+1 %}{% endif %}
  • {%- endfor %} {%- end-def %} {%- with toc=len:toc == 1 ? toc.0.children : toc %} {% if toc %}
    In this page
    {% call "render_toc" with nodes=toc, level=1 %}
    {%- end-if %} {%- end-with %}