{% extends "base.html" %} {% block extrahead %} {# 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 %}