{#- Custom tabs override to include search box inside the grid. We manually render the tabs list to ensure it's inside the same grid as the search. URL handling follows Material for MkDocs pattern: - For items with children (sections), recursively find the first leaf page URL - For items without children (direct pages), use the item's own URL -#} {#- Macro to recursively find the first leaf page URL -#} {% macro get_first_page_url(item) %} {%- if item.children -%} {{ get_first_page_url(item.children[0]) }} {%- else -%} {{ item.url }} {%- endif -%} {% endmacro %}