{# Share Dropdown Component Extracted from page-hero-api.html - the LLM share dropdown with AI assistant links. Receives from parent context: - page: Page object with .href or ._path Example: {% include 'partials/page-hero/_share-dropdown.html' %} #} {# Macro: Get page URL with fallback chain #} {% macro get_page_url(page) -%} {{ page._path if page._path is defined else (page.href if page.href is defined else '/') }} {%- endmacro %} {# 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 %}