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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
{% import "macros/social.html" as social_macros %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% block title %}<title>{% if page.title %}{{ page.title }} | {% endif %}{{ config.title }}</title>{% endblock title %}
{% block description %}
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
<meta name="twitter:description" content="{{ page.description }}">
<meta property="og:description" content="{{ page.description }}">
{% else %}
<meta name="description" content="{{ config.description }}" />
<meta name="twitter:description" content="{{ config.description}}">
<meta property="og:description" content="{{ config.description }}">
{% endif %}
{% endblock description %}
{% if page.extra.keywords %}
<meta name="keywords" content="{{ page.extra.keywords }}, {{ config.extra.keywords }}">
{% else %}
<meta name="keywords" content="{{ config.extra.keywords }}">
{% endif %}
<meta name="author" content="{{ config.extra.author }}">
<meta name="copyright" content="{{ config.title }}">
{% if config.extra.google %}<meta name="google-site-verification" content="{{ config.extra.google | safe }}">{% endif %}
{% if config.extra.bing %}<meta name="msvalidate.01" content="{{ config.extra.bing | safe}}">{% endif %}
<meta name="referrer" content="no-referrer-when-downgrade">
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index,follow">
<meta name="HandheldFriendly" content="True">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
{% block css %}<link rel="stylesheet" href="{{ get_url(path="abridge.css", trailing_slash=false, cachebust=true) }}">{% endblock css %}
{% if config.extra.favicon %}
<link rel="shortcut icon" href="{{ get_url(path=config.extra.favicon, trailing_slash=false) }}" sizes="16x16" type="image/png"/>
{% else %}
<link rel="shortcut icon" href="{{ get_url(path="favicon.png", trailing_slash=false) }}" sizes="16x16" type="image/png"/>
{% endif %}
<link rel="canonical" href="{{ get_url(path="/") }}">
{% if config.generate_feed %}<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="atom.xml") }}">{% endif %}
{% block ogp_head %}
{% if page.title %}
<meta property="og:title" content="{{ page.title }} | {{ config.title }}">
<meta name="twitter:title" content="{{ page.title }} | {{ config.title }}">
{% else %}
<meta property="og:title" content="{{ config.title }}">
<meta name="twitter:title" content="{{ config.title }}">
{% endif %}
<meta property="og:site_name" content="{{ config.title }}">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">
<meta property="og:updated_time" content="{{ now() }}">{% endblock ogp_head %}
{% block current_url %}<meta property="og:url" content="{{ current_url | safe }}">
<meta name="twitter:url" content="{{ current_url | safe }}">{% endblock current_url %}
{% if config.extra.social.twitter %}
<meta name="twitter:site" content="@{{ config.extra.twitter }}">
<meta name="twitter:creator" content="@{{ config.extra.twitter }}">
{% endif %}
{% if page.extra.thumbnail %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ get_url(path=page.path ~ page.extra.thumbnail, trailing_slash=false) }}">
<meta property="og:image" content="{{ get_url(path=page.path ~ page.extra.thumbnail, trailing_slash=false) }}">
{% elif page.extra.static_thumbnail %}
{%if page.extra.static_thumbnail is matching("^http[s]?://") %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ page.extra.static_thumbnail }}">
<meta property="og:image" content="{{ page.extra.static_thumbnail }}">
{% else %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ get_url(path=page.extra.static_thumbnail, trailing_slash=false) }}">
<meta property="og:image" content="{{ get_url(path=page.extra.static_thumbnail, trailing_slash=false) }}">
{% endif %}
{% elif config.extra.default_og_image %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}">
<meta property="og:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}">
{% elif config.extra.banner %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}">
<meta property="og:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}">
{% else %}
<meta name="twitter:card" content="summary">
{% endif %}
{% block extra_head %}{% endblock extra_head %}
</head>
<body>
{% block header %}<header>
<nav>
<header>
<h1><a href="{{ get_url(path="/", trailing_slash=true) }}">{{ config.extra.textlogo | safe }}</a></h1>
</header>
<div overflow>
<ul>
{% for i in config.extra.menu %}<li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a></h2></li>{% endfor %}
</ul>
</div>
</nav>
{% if config.extra.sitedesc %}{% if config.description %}<div>{{ config.description }}</div>{% endif %}{% endif %}
<hr>
</header>{% endblock header %}
<main>{% block content %}
{% endblock content %}
</main>
{% block footer %}<footer>
<hr>
<center>
<p>{{ social_macros::social_links(social_config=config.extra.social) }}</p>
{# Copyright #}
{% set start_year=config.extra.start_year | default(value="") %}
{% if start_year %}{% set start_year=start_year ~ "-" %}{% endif %}
{% set end_year=config.extra.end_year | default(value=now() | date(format="%Y")) %}
<p>Copyright © {{ start_year ~ end_year}} {{ config.title }}</p>
<p>{% for i in config.extra.menu_footer %}<a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a> {% endfor %}</p>
{# Optional footer credit #}
{% if config.extra.footer_credit %}
<p>Powered by <a href="https://www.getzola.org/">Zola</a> and <a href="https://github.com/jieiku/abridge/">Abridge</a></p>
{% endif %}
</center>
</footer>{% endblock footer %}
</body>
</html>
|