Hwaro::Content::Search
Constants
Entry fields the generator knows how to emit; anything else in
search.fields is silently skipped, so the manifest's fields list
must be filtered the same way.
Shard id for pages outside every section (content/about.md).
Sharded output lives under <output_dir>/search/: one
<shard-id>.json per shard plus this manifest. Fixed names (not
derived from filename) so a client can discover the layout from a
single well-known URL.
An h2/h3 element of the rendered page, and the id attribute in its
attribute list (quote-aware: title="a > b" does not end the tag).
split_by_heading cuts the page body at these.
Class methods
The entry keys every emitted entry carries, in emission order:
the configured fields (known ones only), then url (always
present) and lang (always appended). Exposed for the manifest.
The h2/h3 sections of a rendered page body, in document order: each
heading's real id (as the page's own anchor links use it), its
inner HTML, and the HTML up to the next h2/h3. A heading without an
id still ends the previous section but yields no record: it has no
anchor to link to.
Every file the current config publishes, as it stands on disk after
generate ran (or skipped as unchanged): the classic index when a
single file is emitted, plus the manifest and each shard it lists.
The builder claims these, so a warm --cache build (or a serve
rebuild) removes what an earlier config published and this one does
not — search.json after single_file = false or a filename
change, the search/ tree after shards = "none", everything once
search is disabled.