Skip to content

Illuminate Documentation

Illuminate

Home

Search

Learn about the full-text search feature included by default with Illuminate.


Overview

Search on Illuminate is powered by Pagefind, a powerful full-text search library designed for static sites, and paired with a custom interface that supports keyboard interaction. This combination ensures users can quickly find the information they need while providing an accessible, user-friendly experience.


Indexing content

Pagefind indexes your site's content at build time, creating a static search bundle that can be queried directly from the client side. To build and index your site, use the following command:

terminal

npm run build


Excluding content

To exclude content contained within any special components, such as code blocks, tag the component with the data-pagefind-ignore attribute.

exclude-component-content-from-index.mdx

This code block will be excluded from the search index at build time:
<CH.Code data-pagefind-ignore>
```python python-example.py
print("Hello, world!")
```
</CH.Code>

To exclude Markdown content that is not contained within a special component, wrap the content with a div element, and then add the data-pagefind-ignore attribute to the div.

exclude-markdown-content-from-index.mdx

This paragraph will be included in the search index.
<div data-pagefind-ignore>
This paragraph will be excluded from the search index.
</div>


Keyboard support

The search interface supports keyboard interaction to toggle the search modal, select results, and navigate to a result for accessibility and efficiency.

KeyFunction
Cmd/Ctrl + KOpen the search modal
ArrowDownSelects the next search result
ArrowUpSelects the previous search result
EnterNavigates to the selected search result
EscCloses the search modal

Built with by