From d13b9ae0a85e46745d7b3835b9d9c8f462c8b719 Mon Sep 17 00:00:00 2001 From: Fidel Ramos Date: Sun, 27 Oct 2019 15:21:23 +0000 Subject: [PATCH] Set alternate link tags for translated content `` is good practice for SEO and helps people find the content in their preferred language. --- templates/article.html | 7 +++++++ templates/page.html | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/templates/article.html b/templates/article.html index 243b1f5..da6f718 100644 --- a/templates/article.html +++ b/templates/article.html @@ -5,6 +5,13 @@ +{% if article.translations -%} + +{% for a in article.translations %} + +{% endfor %} +{% endif %} + {% include "partial/og_article.html" %} {% endblock %} diff --git a/templates/page.html b/templates/page.html index 98eeb12..64a7ead 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,5 +1,16 @@ {% extends "base.html" %} +{% block meta %} +{{ super() }} + +{% if page.translations -%} + +{% for p in page.translations %} + +{% endfor %} +{% endif %} +{% endblock %} + {% block title %} – {{ page.title }}{% endblock %} {% block content %}