From eb79cee7ef6bdc4a44aabfce10617a18be2b8d96 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 26 Dec 2020 19:07:29 +0100 Subject: Add opengraph support. --- templates/authors/single.html | 5 +++++ templates/base.html | 26 ++++++++++++++++++++++++-- templates/page.html | 9 +++++++++ templates/tags/single.html | 5 +++++ 4 files changed, 43 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/authors/single.html b/templates/authors/single.html index f61ac4b..5acc50f 100644 --- a/templates/authors/single.html +++ b/templates/authors/single.html @@ -1,4 +1,9 @@ {% extends "base.html" %} +{% block opengraph %} + + + +{% endblock opengraph %} {% block content %}

{{ trans(key="posts_by", lang=lang) }} {{ term.name }}

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 @@ - {% if page.title %}{{ page.title }}{% else %}{{ config.title }}{% endif %} - + {% if page.title %}{{ page.title }} - {% endif %}{{ config.title }} + + + {% block opengraph %} + + + + + + {% if page.extra['opengraph']['img'] %} + + {% endif %} + + + + + + + {% if page.extra['opengraph']['img'] %} + + {% endif %} + {% endblock opengraph %} + + + + + + +{% endblock opengraph %} + {% block language %} {% set translations = page.translations %} {% include "translation-links.html" %} diff --git a/templates/tags/single.html b/templates/tags/single.html index ab0364c..63660d0 100644 --- a/templates/tags/single.html +++ b/templates/tags/single.html @@ -1,4 +1,9 @@ {% extends "base.html" %} +{% block opengraph %} + + + +{% endblock opengraph %} {% block content %}

Tag: {{ term.name }}

-- cgit v1.2.3