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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| {%- extends "base.html" -%}
{%- block title %}{{ page.title }} — {{ config.title }}{% endblock title -%}
{%- block description -%}
{%- if page.description %}
<meta name="description" content="{{ page.description }}">
{%- endif -%}
{%- endblock description -%}
{%- block main %}
<article>
<header>
<h1>{{ page.title }}</h1>
{%- if page.date %}
<time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.date_format | default(value="%y.%m.%d")) }}</time>
{%- endif %}
{%- if page.reading_time %}
· {{ page.reading_time }} min read
{%- endif %}
{%- if page.taxonomies.tags %}
<p>Tags:
{%- for tag in page.taxonomies.tags %}
<a href="{{ get_taxonomy_url(kind='tags', name=tag) }}">{{ tag }}</a>
{%- if not loop.last %},{% endif %}
{%- endfor %}
</p>
{%- endif %}
{%- if page.description %}
<p>{{ page.description }}</p>
{%- endif %}
</header>
{%- if page.toc %}
<nav aria-label="Table of contents">
<details>
<summary>Contents</summary>
<ul>
{%- for h1 in page.toc %}
<li><a href="#{{ h1.id }}">{{ h1.title }}</a>
{%- if h1.children %}<ul>
{%- for h2 in h1.children %}
<li><a href="#{{ h2.id }}">{{ h2.title }}</a></li>
{%- endfor %}</ul>{%- endif %}
</li>
{%- endfor %}
</ul>
</details>
</nav>
{%- endif %}
<hr>
{{ page.content | safe }}
</article>
{%- endblock main %}
|