{% 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 %}
{% if "navigation.path" in features %} {% include "path.html" %} {% endif %}
{% block content %} {% include "partials/content.html" %} {% if page.previous_page or page.next_page %} {% if page.meta and page.meta.hide %} {% set hidden = "hidden" if "footer" in page.meta.hide %} {% endif %} {% endif %} {% endblock %}
{% include "partials/tx-footer.html" %}
{% endblock %} {% block header %} {% include "header-2.html" %} {% endblock %} {# Tabs are rendered inside the header (header-2.html); suppress base.html's below-header tabs so they aren't duplicated. #} {% block tabs %}{% endblock %} {% block scripts %} {{ super() }} {#- Live cross-tab/cross-app sync: when the shared dstack-theme changes elsewhere (e.g. the React landing's footer toggle in another tab), apply it here without a reload. The docs' own footer toggle writes dstack-theme directly (assets/javascripts/extra.js). First paint is flash-free via extrahead → __palette → Material's inline palette script. -#} {% endblock %} {% block announce %} Infrastructure orchestration is an agent skill {% endblock %} {# Footer is rendered INSIDE .md-content (above, after the article) — NOT as a full-width sibling — so it starts to the RIGHT of the left sidebar (left sidebar stays a full-height column on its left) and keeps .md-main__inner tall enough that the sticky left sidebar never eases away. #} {% block footer %}{% endblock %} {% block site_nav %} {% if nav %} {% if page.meta and page.meta.hide %} {% set hidden = "hidden" if "navigation" in page.meta.hide %} {% endif %} {% endif %} {% if "toc.integrate" not in features %} {% if page.meta and page.meta.hide %} {% set hidden = "hidden" if "toc" in page.meta.hide %} {% endif %} {% endif %} {% endblock %}