pages.sections

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Section resolution for route metadata.

Resolves section context (tab_items, breadcrumb_prefix) from RouteMeta.section and registered sections. Pure function — no side effects.

Section resolution for route metadata.

Resolves section context (tab_items, breadcrumb_prefix) from RouteMeta.section and registered sections. Pure function — no side effects.

pages.sections

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

_tab_item_to_shell_dict
function
def _tab_item_to_shell_dict(tab: TabItem) -> dict[str, Any]

Shape for templates andtab_is_active(chirp-ui route tabs).

Parameters

Name Type Default Description
tab TabItem
resolve_section_context
function
def resolve_section_context(meta: RouteMeta | None, sections: dict[str, Section]) -> dict[str, Any]

Resolve section context from RouteMeta.section.

Returns tab_items and breadcrumb_prefix from the matched section, or empty dict if no match (meta is None, section id unknown, or section not registered).

Parameters

Name Type Default Description
meta RouteMeta | None Route metadata (may be None).
sections dict[str, Section] Registered sections keyed by id.

View source · /home/runner/work/chirp/chirp/site/../src/chirp/pages/sections.py:1