mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-18 12:52:47 +00:00
22 lines
502 B
HTML
22 lines
502 B
HTML
|
{% macro toc(page, type="text") %}
|
||
|
{% if page.toc %}
|
||
|
<strong>Contents</strong><br>
|
||
|
<ul>
|
||
|
{% for h1 in page.toc %}
|
||
|
<li>
|
||
|
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
|
||
|
{% if h1.children %}
|
||
|
<ul>
|
||
|
{% for h2 in h1.children %}
|
||
|
<li>
|
||
|
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
|
||
|
</li>
|
||
|
{% endfor %}
|
||
|
</ul>
|
||
|
{% endif %}
|
||
|
</li>
|
||
|
{% endfor %}
|
||
|
</ul>
|
||
|
{% endif %}
|
||
|
{% endmacro input %}
|