{% extends "base.html" %} {% from 'partials/navigation-components.html' import breadcrumbs, page_navigation %} {% from 'partials/components/tags.html' import tag_list %} {% from 'partials/components/tiles.html' import content_tiles %} {% from 'partials/page-actions.html' import page_actions %} {% from 'chirpui/button.html' import btn %} {% from 'chirpui/hero.html' import page_hero %} {% block content %} {% let discover = params?.discover ?? {} %} {% let children_discover = discover.get("children") if discover is mapping else none %} {% let related_discover = discover.get("related") if discover is mapping else none %} {% let children_enabled = children_discover is not sameas false %} {% let related_enabled = related_discover is not sameas false %} {% let children_title = none if (children_discover is mapping and children_discover.get("title") is sameas false) else ((children_discover.get("title") if children_discover is mapping else none) ?? 'In This Section') %} {% let related_title = none if (related_discover is mapping and related_discover.get("title") is sameas false) else ((related_discover.get("title") if related_discover is mapping else none) ?? 'Related Pages') %} {% let children_variant = (children_discover.get("variant") if children_discover is mapping else none) ?? 'compact' %} {% let related_limit = (related_discover.get("limit") if related_discover is mapping else (related_discover if related_discover is number else none)) ?? 5 %} {% let show_children_feature = 'content.children' in (theme?.features ?? []) %} {% let show_children = children_enabled and show_children_feature %} {% let show_related = related_enabled %} {% let has_children = (posts | length > 0) or (subsections | length > 0) %} {% let related_posts = page?.related_posts ?? [] %} {% let has_related = show_related and (related_posts | length > 0) %}
{% let doc_title = page?.title ?? section?.title ?? config?.title ?? 'Documentation' %} {% let doc_description = params?.description ?? page?.metadata?.description ?? meta_desc ?? '' %} {% let doc_child_total = (posts | length) + (subsections | length) %} {% let doc_meta_parts = [] %} {% if page?.date %} {% set _ = doc_meta_parts.append('Updated ' ~ (page.date | time_ago)) %} {% end %} {% if doc_child_total > 0 %} {% set _ = doc_meta_parts.append(doc_child_total ~ ' item' ~ ('s' if doc_child_total != 1 else '')) %} {% end %} {% if page?.version %} {% set _ = doc_meta_parts.append('Version ' ~ page.version) %} {% end %} {% call page_hero(title=doc_title, subtitle=doc_description, variant='editorial', background='solid', cls='chirp-theme-docs-layout__hero chirp-theme-doc-hero') %} {% slot eyebrow %} {{ breadcrumbs(page) }} {% end %} {% slot metadata %} {% if doc_meta_parts | length > 0 %} {{ doc_meta_parts | join(' ยท ') }} {% end %} {% end %} {% slot actions %} {{ page_actions(page) }} {% if params?.hero_link?.href %} {{ btn(params.hero_link.label ?? 'Explore', href=params.hero_link.href | absolute_url, variant='secondary') }} {% end %} {% end %} {% end %}
{{ content | safe }}
{% if show_children and (has_children or has_related) %} {% cache "doc-list-tiles-" ~ (page?.href ?? '') ~ "-" ~ (site?.build_id ?? '') %}
{{ content_tiles( title=children_title if has_children else none, children=posts if show_children else none, subsections=subsections if show_children else none, related=related_posts[:related_limit] if has_related else none, related_title=related_title, variant=children_variant, group_by='type' if has_children and has_related else none, page=page ) }}
{% endcache %} {% end %} {% if page?.tags | length > 0 %}
{{ tag_list(page.tags) }}
{% end %}
{{ page_navigation(page) }} {% with footer_class='chirp-theme-footer chirp-theme-footer--shell' %}{% include 'partials/site-footer.html' %}{% end %}
{% if toc_items | length > 0 %} {% end %}
{% end %} {% block site_footer %}{% end %}