bundle.website.core.pages ========================= .. py:module:: bundle.website.core.pages .. autoapi-nested-parse:: Reusable page registration primitives for website sites. Classes ------- .. autoapisummary:: bundle.website.core.pages.Page Functions --------- .. autoapisummary:: bundle.website.core.pages.mount_page bundle.website.core.pages.initialize_pages Module Contents --------------- .. py:class:: Page Bases: :py:obj:`Protocol` Structural interface a page module must satisfy to be registered. .. py:attribute:: name :type: str .. py:attribute:: slug :type: str .. py:attribute:: href :type: str .. py:attribute:: description :type: str .. py:attribute:: router :type: fastapi.routing.APIRouter .. py:attribute:: static_path :type: pathlib.Path | None .. py:attribute:: show_in_nav :type: bool .. py:attribute:: show_on_home :type: bool .. py:function:: mount_page(app: fastapi.FastAPI, page: Page) -> None Attach a single page router and its static directory to the app. .. py:function:: initialize_pages(app: fastapi.FastAPI, pages: collections.abc.Iterable[Page]) -> tuple[Page, Ellipsis] Attach all pages and expose registry/navigation metadata on app state.