summaryrefslogtreecommitdiff
path: root/templates/translations.html
diff options
context:
space:
mode:
authorRafael Laboissière <rafael@laboissiere.net>2022-12-11 09:55:21 +0100
committerRafael Laboissière <rafael@laboissiere.net>2022-12-11 09:55:21 +0100
commitf08e56433fb2c92a9172787adcb33edee347bc7b (patch)
treea22469e241b12306d1fc6c766bcd82ebb74b5c7b /templates/translations.html
parent620ce27818a754dc9604d5a9344fa493cdf1241b (diff)
Update for new upstream version (revision 3891)upstream
Diffstat (limited to 'templates/translations.html')
-rw-r--r--templates/translations.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/translations.html b/templates/translations.html
new file mode 100644
index 0000000..1eec7c4
--- /dev/null
+++ b/templates/translations.html
@@ -0,0 +1,16 @@
+{% macro translations_for(article) %}
+{% if article.translations %}
+Translations:
+ {% for translation in article.translations %}
+ <a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
+ {% endfor %}
+{% endif %}
+{% endmacro %}
+
+{% macro entry_hreflang(entry) %}
+{% if entry.translations %}
+ {% for translation in entry.translations %}
+ <link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
+ {% endfor %}
+{% endif %}
+{% endmacro %}