Search processor
In this article
The searchProcessor
adds a search function to the generated site and creates a searchable index.
The index is based on:
- the page title
- the component name(s)
- additional extra search terms given in the document.
Usage
const docs = new Generator(import.meta.url, {
processors: [searchProcessor()],
});
Configuration
This processor has no configuration.
Search terms
The the markdown document a list of additional search terms can be listed in the frontmatter block:
---
search:
terms:
- foo
- bar
---
Searching for any of those terms will show results for the page.