Cherry.Pipeline.Stages.Search (cherry v0.4.0)

Copy Markdown View Source

Emits the runtime for search: "cherry", Cherry's built-in search engine: search/index.json and the search/search.js island.

Unlike Stages.Post — which shells out to Pagefind — this stage is a pure function of the parsed documents, so it runs anywhere cherry itself runs and lands inside the deterministic build.

The island ships from here rather than from each theme's assets/, so any theme, including one a site wrote itself, gets a working search box by rendering the markup and pointing at these paths.

Runs after Machine and before Emit: the index is a runtime data file, not part of the human site or the machine surface, so it stays out of the sitemap, the feeds, and llms.txt.

Summary

Functions

Output path of the emitted index.

Output path of the emitted search island.

Functions

index_path()

@spec index_path() :: String.t()

Output path of the emitted index.

script_path()

@spec script_path() :: String.t()

Output path of the emitted search island.