{% extends "base.html" %} {% block extrahead %} {#- The single mapping from the shared dark/light choice (localStorage['dstack-theme'], shared with website/src/theme.ts) onto Material's native palette. Defined as a global here — in the first inline script, during parse — so every other theme touchpoint (the header radio sync, the footer toggle in extra.js, the cross-tab storage listener below) reuses ONE definition instead of re-spelling the {index, color} object and the dark=slate=index-1 mapping. Uses Material's __md_set (defined just above in partials/javascripts/base.html) so the key gets Material's scope prefix (e.g. /.__palette) — a plain localStorage key is ignored by Material. -#} {# Structured data (JSON-LD) for SEO. - Homepage gets WebSite + Organization schema (helps Google show sitelinks and knowledge panel). - All other pages get BreadcrumbList schema (helps Google show breadcrumb trails in results). Breadcrumb URLs are resolved via _find_leaf_url because MkDocs nav sections don't have their own URLs — we use the first descendant page's URL as a proxy. Dedup by title to collapse nav levels duplicated by plugins (e.g. the blog plugin nests "Blog" inside "Blog"). The current page is omitted when its title matches the last ancestor (e.g. /examples/ is both the "Examples" section index and the page itself). #} {% macro _find_leaf_url(nav_item) -%} {%- if nav_item.url -%} /{{ nav_item.url }} {%- elif nav_item.children -%} {{ _find_leaf_url(nav_item.children | first) }} {%- endif -%} {%- endmacro %} {% if page.is_homepage %} {% elif page.ancestors | length > 0 %} {% endif %} {% endblock %} {% block container %}