      <menu class="sidebar">
    {% for type, name, id, doc in sects %}
        {% if type == 'h2' %}<h2><a href="#{{ id }}">{{ name }}</a></h2>
        {% elif type == 'h3' %}<h3><a href="#{{ id }}">{{ name }}</a></h3>
        {% endif %}
    {% endfor %}
      </menu>

    <div class="content">
    {% for type, name, args, doc in sects %}
      {% if type == 'text' %}
      <div>{{ doc }}</div>
      {% endif %}
    {% endfor %}
    </div>
