summaryrefslogtreecommitdiffstats
path: root/templates/base.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/base.html')
-rw-r--r--templates/base.html26
1 files changed, 24 insertions, 2 deletions
diff --git a/templates/base.html b/templates/base.html
index 78dcb60..69e836a 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -5,8 +5,30 @@
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>{% if page.title %}{{ page.title }}{% else %}{{ config.title }}{% endif %}</title>
- <meta name="description" content="{{ trans(key='description', lang=lang) }}">
+ <title>{% if page.title %}{{ page.title }} - {% endif %}{{ config.title }}</title>
+
+ <!-- Open Graph stuff -->
+ {% block opengraph %}
+ <meta name="description" content="{{ page.extra['opengraph']['desc'] | default(value=trans(key='description', lang=lang)) }}">
+ <meta property="og:description" content="{{ page.extra['opengraph']['desc'] | default(value=trans(key='description', lang=lang)) }}">
+ <meta property="og:title" content="{{ page.title | default(value=config.title) }}">
+ <meta property="og:type" content="article">
+ <meta property="og:url" content="{{ page.permalink | default(value=section.permalink | safe) | safe }}">
+ {% if page.extra['opengraph']['img'] %}
+ <meta property="og:image" content="{{ current_url | safe }}{{ page.extra['opengraph']['img'] | safe }}">
+ {% endif %}
+
+ <meta name="twitter:card" content="summary_large_image">
+ <meta property="twitter:domain" content="volse.net">
+ <meta property="twitter:url" content="{{ page.permalink | default(value=section.permalink | safe) | safe }}">
+ <meta property="twitter:title" content="{{ page.title | default(value=config.title) }}">
+ <meta property="twitter:description" content="{{ page.extra['opengraph']['desc'] | default(value=trans(key='description', lang=lang)) }}">
+ {% if page.extra['opengraph']['img'] %}
+ <meta property="twitter:image" content="{{ current_url | safe }}{{ page.extra['opengraph']['img'] | safe }}">
+ {% endif %}
+ {% endblock opengraph %}
+ <meta property="og:site_name" content="{{ config.title }}">
+
<link rel="stylesheet" type="text/css" href="{{ get_url(path='/styles.css') | safe }}">
<link rel="alternate"