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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
{% extends "base.html" %}
{% block extrahead %}
{% if page.permalink is containing("weblog") %}
<meta property="og:site_name" content="{{ trans(key="weblog_title", lang=lang) }}" />
{% elif page.permalink is containing("food") %}
<meta property="og:site_name" content="{{ trans(key="recipes_title", lang=lang) }}" />
{% else %}
<meta property="og:site_name" content="{{ trans(key="website_title", lang=lang) }}" />
{% endif %}
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:url" content="{{ page.permalink }}" />
<meta property="og:type" content="article" />
{% if page.summary %}
<meta property="og:description" content="{{ page.summary | striptags }}" />
{% endif %}
{% if page.permalink is containing("food") %}
<meta property="og:image" content="recipe.jpg" />
{% endif %}
{% endblock %}
{% block title %}
{% if page.permalink is containing("weblog") %}
{{ page.title }} - {{ trans(key="weblog_title", lang=lang) }}
{% elif page.permalink is containing("food") %}
{{ page.title }} - {{ trans(key="recipes_title", lang=lang) }}
{% else %}
{{ page.title }} - {{ trans(key="website_title", lang=lang) }}
{% endif %}
{% endblock %}
{% block header %}
<h1>{{ page.title }}</h1>
<p class="publish-date">
{% if page.date %}
{{ trans(key="published", lang=lang) }}
{{ page.date | date(format="%Y-%m-%d %H:%M UTC") }}
{{ trans(key="published_on", lang=lang) }}
{% else %}
{{ trans(key="not_published", lang=lang) }}
{% endif %}
{% if page.permalink is containing("weblog") %}
<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/weblog">
{{ trans(key="weblog_title", lang=lang) }}
</a>
{% elif page.permalink is containing("food") %}
<a href="{% if lang != "en" %}/{{ lang }}{% endif %}/food">
{{ trans(key="recipes_title", lang=lang) }}
</a></p>
{% endif %}
</p>
{% if page.updated %}
<p class="publish-date">
{{ trans(key="edited", lang=lang) }}
{{ page.updated | date(format="%Y-%m-%d %H:%M UTC") }}
</p>
{% endif %}
{% if page.translations | length > 1 %}
<p class="publish-date">
{{ trans(key="also_read", lang=lang) }}
{% for trans in page.translations %}
{% if trans.lang != lang %}
{% if trans.lang == "ru" %}
<a href="{{ trans.permalink }}">Русский</a>
{% elif trans.lang == "es" %}
<a href="{{ trans.permalink }}">Español</a>
{% else %}
<a href="{{ trans.permalink }}">English</a>
{% endif %}
{% endif %}
{% endfor %}
</p>
{% endif %}
{% endblock %}
{% block content %}
<div class="post-container full">
{{ page.content | safe }}
</div>
{% endblock %}
|