blob: 2ad23e6a4a9e04a7f9ceb7b227c90c86c12caa83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
{% macro table_of_contents(toc, max_level) %}
<ul>
{% for header in toc %}
<li>
<a href="{{ header.permalink | safe }}">{{ header.title }}</a>
{% if header.children and header.level < max_level %}
{{ self::table_of_contents(toc=header.children, max_level=max_level) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endmacro %}
|