{% if posts.pages > 1 %}
{# Pagination links: include lang= ONLY when the visitor is NOT on the
default language. Generating /?page=N&lang= as an internal
link would otherwise let Google index /?lang=&page=N as a
distinct URL with its own canonical, defeating the /?lang= →
/ 301-redirect in index(). url_for() drops keys whose value is None. #}
{%- if current_language and current_language != (default_language or 'en') %}
{%- set _pag_lang = current_language %}
{%- else %}
{%- set _pag_lang = none %}
{%- endif %}
{% endif %}
{% else %}