{#-
    Injects per-page JSON-LD (TechArticle + BreadcrumbList) into the <head>
    of every doc page rendered by Furo. The landing page at `/` uses a
    separate standalone template (``_templates/index.html`` via
    ``html_additional_pages``) and is unaffected.

    `pageurl` is populated by Sphinx only when `html_baseurl` is set in
    conf.py — the ``{% if pageurl %}`` guard keeps dev builds without a
    base URL safe. IDs ``#website``/``#software``/``#org`` reference the
    graph nodes defined in the landing-page JSON-LD, linking this page
    into the same semantic graph.
-#}
{% extends "!page.html" %}
{% block extrahead %}
  {{ super() }}
  {%- if pageurl %}
  <script type="application/ld+json">{
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "TechArticle",
        "@id": {{ (pageurl ~ "#techarticle") | tojson }},
        "headline": {{ title | striptags | tojson }},
        "url": {{ pageurl | tojson }},
        "isPartOf": {"@id": "https://xon.sh/#website"},
        "about": {"@id": "https://xon.sh/#software"},
        "inLanguage": "en",
        "author": {"@id": "https://xon.sh/#org"},
        "publisher": {"@id": "https://xon.sh/#org"}
      },
      {
        "@type": "BreadcrumbList",
        "itemListElement": [
          {"@type": "ListItem", "position": 1, "name": "Home", "item": "https://xon.sh/"}
          {%- if pagename != master_doc -%}
          ,{"@type": "ListItem", "position": 2, "name": "Contents", "item": "https://xon.sh/contents.html"}
          ,{"@type": "ListItem", "position": 3, "name": {{ title | striptags | tojson }}, "item": {{ pageurl | tojson }}}
          {%- else -%}
          ,{"@type": "ListItem", "position": 2, "name": {{ title | striptags | tojson }}, "item": {{ pageurl | tojson }}}
          {%- endif %}
        ]
      }
    ]
  }</script>
  {%- endif %}
{% endblock %}
