friendenstein/templates/macros/post.html
2024-01-02 12:18:18 +01:00

38 lines
752 B
HTML

{% macro toc(toc) %}
<div class="toc">
<h2>Table of contents</h2>
<ul>
{% for h1 in 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>
<ul>
{% for h3 in h2.children %}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endmacro toc %}
{% macro tags(tags) %}
<p class="tags-data">
{% if page.taxonomies.tags %}
{% for tag in tags %}
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
{% endfor %}
{% endif %}
</p>
{% endmacro tags %}