{%- extends "pydata_sphinx_theme/layout.html" %}
{%- block extrahead %}
{{ super() }}
{%- if baseurl %}
{#- Tolerate a trailing slash in baseurl: unnormalized, it yields double-slash
canonicals (e.g. https://example.com//en/stable/...) that search engines
treat as broken and refuse to index. #}
{%- set canonical_base = baseurl.rstrip('/') %}
{#- Canonicalize index pages to the directory URL, which is how they are
linked and served, rather than the duplicate .../index.html form. #}
{%- if pagename == 'index' %}
{%- set page_path = '' %}
{%- elif pagename.endswith('/index') %}
{%- set page_path = pagename[:-5] %}
{%- else %}
{%- set page_path = pagename + '.html' %}
{%- endif %}
{%- if translations %}
{%- for lang in translations %}
{%- endfor %}
{%- endif %}
{%- endif %}
{%- endblock extrahead %}