{# The three data-* attributes are all required: @primer/primitives scopes each theme with selectors like [data-color-mode="auto"][data-light-theme="light"] so setting data-color-mode alone leaves every variable undefined. #} {# `i18n_page_locale` is put on the page context by mkdocs-static-i18n. That plugin only rewrites `theme.locale` for the themes it ships support for, so a third-party theme that reads `theme.locale` alone labels every translated page as the default language. #}
{%- block site_meta %} {%- set page_title = page.title if page and page.title else config.site_name %} {%- set page_description = page.meta.description if page and page.meta.description else config.site_description %} {%- if page and page.meta.description %} {%- elif config.site_description %} {%- endif %} {%- if config.site_author %} {%- endif %} {%- if page and page.canonical_url %} {%- endif %} {# Social crawlers generally do not infer a page title or description. #} {%- if page_description %} {%- endif %} {%- if page and page.canonical_url %} {%- endif %} {%- if page and page.meta.image %} {%- endif %} {%- if config.theme.favicon %} {%- endif %} {# mkdocs-rss-plugin writes the feeds but leaves discovery to the theme, so without these a reader has no way to find them. The filenames are a plugin option, hence reading them back off the plugin config. #} {%- set rss_plugin = config.plugins.get('rss') %} {%- if rss_plugin %} {%- endif %} {%- endblock %}