{#- Site-wide
additions. mkdocs-material emits a title, description and canonical link, but nothing a link unfurler reads: without these tags Slack, Discord, X, LinkedIn and iMessage render an AnyInfer link as bare text with a generic globe icon. Every value is derived from the page itself, so each page unfurls with its own title and description over the shared brand card (docs/assets/anyinfer-social-card.png, generated by scripts/render_social_card.py). Based on mkdocs-material 9.7.7 -- re-sync the block names on Material pin bumps. -#} {% extends "base.html" %} {% block extrahead %} {#- Unfurlers require absolute URLs, so everything hangs off site_url. The `| url` fallback keeps a site_url-less build (rare, but `mkdocs serve` allows it) from emitting a broken absolute path. -#} {% set origin = config.site_url | default("", true) %} {% if origin and not origin.endswith("/") %} {% set origin = origin ~ "/" %} {% endif %} {% set card = origin ~ "assets/anyinfer-social-card.png" if origin else "assets/anyinfer-social-card.png" | url %} {% set icon = origin ~ "assets/anyinfer-icon-512.png" if origin else "assets/anyinfer-icon-512.png" | url %} {#- Mirrors base.html's own title logic so the unfurl and the browser tab agree. -#} {% if page.meta and page.meta.title %} {% set title = page.meta.title ~ " - " ~ config.site_name %} {% elif page.title and not page.is_homepage %} {% set title = (page.title | striptags) ~ " - " ~ config.site_name %} {% else %} {% set title = config.site_name %} {% endif %} {% if page.meta and page.meta.description %} {% set description = page.meta.description %} {% else %} {% set description = config.site_description %} {% endif %} {#- base.html already emits the PNG favicon; this adds the vector one browsers prefer when both are offered, plus the home-screen icon iOS uses (it ignores rel="icon"). -#} {#- Seeds the mobile browser chrome with the brand ink before Material's palette script takes the meta over on load. -#} {% endblock %}