Search
Every JAAD site has full-text search, with no configuration and no external service. Readers open it from the header or with Ctrl+K (⌘+K on macOS).
What is indexed
The build cuts every page at its ## and ### headings and indexes each part
with:
- the page title, its chapter and its
keywords; - the heading;
- the text below it, excluding images and tables of contents;
- its code blocks, up to a few thousand characters, so that a name written only in code still finds its page.
The index is <routeBase>/search-index.json, one per language, loaded the
first time search opens. It holds the text of every page, so it grows with the
documentation.
How results are found
- Every word of the query must appear in a part of a page or in the page’s title, chapter or keywords.
- A word also matches the words it starts:
configfindsconfiguration. - A word of five letters or more also matches with one typo:
deploymnetfindsdeployment. - Case and accents are ignored:
cittafindscittà. - Languages written without spaces, such as Chinese, Japanese and Thai, are split into words as the browser splits them.
- A match in the title ranks first, then the heading, the keywords, the chapter, the text, and last the code.
Results are grouped by page. Under each page are the headings that matched, and choosing one opens the page at that heading.
With an empty query, search lists the first pages of the documentation. When the docs have sections, it lists the first pages of each, and buttons above the results limit the search to one section.
Keyboard shortcuts
| Where | Keys | Action |
|---|---|---|
| Search | Ctrl+K or ⌘+K | Open the search palette |
| Search | ↑ ↓ | Select a result |
| Search | Enter | Open the result |
| Search | Esc | Close the palette |
| Page | ← | Open the previous page |
| Page | → | Open the next page |
The page shortcuts are off while:
- an input, textarea, select or editable element has focus;
- the focus is inside a sideways-scrollable area, such as a wide table or code block;
- a modifier key is held.