manymanymany-varia-websites/venv/lib/python3.11/site-packages/pelican/themes/notmyidea/templates/translations.html

17 lines
546 B
HTML
Raw Normal View History

2024-11-19 14:01:39 +01:00
{% 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 %}