aboutsummaryrefslogtreecommitdiffstats
path: root/templates/page.html
blob: 1e395e344ed62b3f150f48204ae6f3b5c8866dce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{% extends "base.html" %}

{% block header %}
<p><a href="..">..</a>/{{ page.slug }}</p>
<p class="post-meta"><time datetime="{{ page.date }}">{{ page.date }}</time></p>
<h1>{{ page.title }}</h1>
{% endblock header %}

{% block content %}

{% if page.toc and page.extra.add_toc %}
Table of contents
<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 %}

{{ page.content | safe }}
{% endblock content %}