blog/templates/macros/post.html
2018-09-22 03:17:41 -05:00

12 lines
352 B
HTML

{% macro render_toc(toc) %}
<ul>
{% for item in toc %}
<li>
<a href="{{ item.permalink | safe }}">{{ item.title }}</a>
{% if item.children %}
{{ self::render_toc(toc=item.children) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endmacro %}