{% macro translations_for(article) %} {% if article.translations %} Translations: {% for translation in article.translations %} {{ translation.lang }} {% endfor %} {% endif %} {% endmacro %} {# Head-side counterpart of the macro above: it tells a search engine that the translations are the same document in another language, which the visible links alone do not. Emitted inside , so it renders nothing when there is no translation. #} {% macro entry_hreflang(entry) %} {% if entry.translations %} {% for translation in entry.translations %} {% endfor %} {% endif %} {% endmacro %}