{# Page Hero - Overview Variant For section index pages (_index.md) - wayfinding focused: - Breadcrumbs as eyebrow (trimmed, no current page) - LLM share button aligned right - Large H1 title tight below breadcrumbs - Description - Section stats (page count) instead of read time/word count Usage: Included via page-hero.html dispatcher Set hero_style: overview in frontmatter or auto-detected for list templates #} {% from 'partials/navigation-components.html' import breadcrumbs with context %} {# Macro: Get page URL with fallback chain for robustness #} {% macro get_page_url(page) -%} {{ page._path if page._path is defined else (page.href if page.href is defined else '/') }} {%- endmacro %} {% if page %}
{# Top row: Breadcrumbs (left) + Actions (right) #}
{# Breadcrumbs as eyebrow - trimmed (excludes current page) #} {# Actions: LLM Share Button #}
{% set page_url = canonical_url(get_page_url(page)) %} {% set llm_txt_url = ensure_trailing_slash(page_url) ~ 'index.txt' %} {% set share_prompt = "Please help me understand this documentation: " + llm_txt_url %}
{# Title - tight below breadcrumbs #}

{{ page.title }}

{# Description #} {% if page.metadata.get('description', '') %}

{{ page.metadata.get('description', '') }}

{% endif %} {# Section Stats - page count instead of read time #} {% set page_count = posts | length if posts else 0 %} {% set subsection_count = subsections | length if subsections else 0 %} {% set total_count = page_count + subsection_count %} {% if total_count > 0 %}
{{ total_count }} {{ 'page' if total_count == 1 else 'pages' }} in this section
{% endif %}
{% endif %}