{% extends "base.html" %} {% from "chirpui/layout.html" import container %} {% from "chirpui/resource_index.html" import resource_index %} {% from "chirpui/badge.html" import badge %} {% from "chirpui/empty.html" import empty_state %} {% block content %} {% let pages = site.listable_pages ?? [] %} {% let query = query ?? "" %} {% set result_types = [] %} {% for item in pages %} {% let item_type = item.type if item.type else "page" %} {% if item_type not in result_types %} {% set _ = result_types.append(item_type) %} {% end %} {% end %} {% call container(max_width="76rem") %} {% call resource_index( page?.title ?? "Search", "/search/" | absolute_url, query=query, subtitle=(pages | length) ~ " pages indexed", search_placeholder="Search documentation...", button_icon="search", results_title="Results", results_subtitle="Grouped by content type", results_layout="stack", has_results=pages | length > 0, empty_title="No pages indexed", empty_icon="search", cls="chirpui-bengal-resource-index" ) %}

{{ pages | length }} results

{% for result_type in result_types %}

{{ result_type | title }}

{{ badge(result_type, variant="muted") }}
{% for item in pages %} {% let item_type = item.type if item.type else "page" %} {% if item_type == result_type %}
{{ badge(item_type, variant="muted") }} {% if item._section?.title ?? none %}{{ item._section.title }}{% end %}
{{ item.title }} {% if item.description ?? item.summary ?? none %}

{{ item.description ?? item.summary }}

{% end %}
{% end %} {% end %}
{% end %}
{% end %} {% end %} {% end %}