{% extends "base.html" %}
{#
Inject Open Graph and Twitter card meta tags on every page.
Uses the per-page ``title`` / ``description`` exposed by MkDocs
(falling back to the site-level values declared in ``mkdocs.yml``)
and the canonical OG image pinned under ``extra.og_image``.
Regenerate the PNG from ``docs/assets/og-image.html`` — the source
lives alongside the rendered image for easy iteration.
#}
{% block extrahead %}
{% if page and page.meta and page.meta.title %}
{% set og_title = page.meta.title %}
{% elif page and page.is_homepage %}
{% set og_title = config.site_name %}
{% elif page and page.title %}
{% set og_title = page.title ~ " · " ~ config.site_name %}
{% else %}
{% set og_title = config.site_name %}
{% endif %}
{% set og_description = page.meta.description if page and page.meta and page.meta.description
else config.site_description %}
{% set og_url = page.canonical_url if page and page.canonical_url else config.site_url %}
{% set og_image = config.extra.og_image %}
{% endblock %}