sphinx_searchlite

Client-side documentation search for any Sphinx theme.

Emits a small JSON index next to the build and ships a dependency-free BM25 engine to score it in the browser. Themes can either use the bundled dialog or drive window.SearchLite themselves.

Submodules

Attributes

Functions

collect_records(→ list[dict[str, str]])

Return one record for the page plus one per addressable section.

setup(→ dict[str, object])

Package Contents

sphinx_searchlite.collect_records(app, pagename: str, doctree: docutils.nodes.document) → list[dict[str, str]][source]

Return one record for the page plus one per addressable section.

Keys are short because the index ships to the browser: u url, t page title, s section heading, x text.

sphinx_searchlite.STATIC_DIR
sphinx_searchlite.ENGINE_DIR
sphinx_searchlite.UI_DIR
sphinx_searchlite.setup(app) → dict[str, object][source]