{% def "render_doctree" -%}
<ul>
    {%- for node in nodes -%}
    <li><a href="${url}#${node.slug}">${node.title}</a></li>
    {% endfor -%}
</ul>
{%- enddef %}

<div class="doc-structure">
    <ol>
    {%- for doc in index.2 %}
        <li class="doc-index" type="${index.0}">
            {%- if index.1 %}
            {% include index.1 %}
            {%- else %}
            {% with url=relto:.urls.doc[slug:doc.name] %}
            <a href="${url}" {%- if .id == doc.id %}class="active"{% endif %}>
        