Skip to main content

Built-in Search

Every Docsio documentation site includes a built-in search feature. Search is available in both the live preview during editing and on your published site. No external services or API keys are required.

Open the search dialog with a keyboard shortcut:

PlatformShortcut
macOSCMD+K
WindowsCtrl+K

You can also click the search input in the navbar. Start typing to see results -- a minimum of 2 characters is required.

How It Works

Search is entirely client-side. During every publish (and when the live preview is initialized), Docsio generates a search-index.json file containing structured data from all your documentation pages.

What Gets Indexed

Each page contributes the following to the search index:

FieldDescription
TitleThe page title from frontmatter
PathThe full URL path (e.g., /docs/getting-started/quickstart)
HeadingsAll headings from H1 through H4 extracted from the page content

How Matching Works

When you type a query, the search component filters pages where:

  • The page title contains your query (case-insensitive), OR
  • Any heading (H1-H4) on the page contains your query (case-insensitive)

Results are limited to the top 8 matches to keep the dropdown concise.

Search Results

Each result in the dropdown shows:

  • Page title -- with your search term highlighted
  • Matching heading -- if the match was in a heading rather than the title, the specific heading is shown below the title (also highlighted)

Keyboard Navigation

Navigate the results entirely with the keyboard:

KeyAction
Arrow DownMove to the next result
Arrow UpMove to the previous result
EnterNavigate to the selected page
EscapeClose the search dialog

You can also click any result to navigate directly.

Search Index Generation

The search index is regenerated automatically:

  • On publish -- the build process generates a fresh index from all documents
  • In the editor -- the live preview sandbox generates an index when your project is loaded

This means your search results always reflect the current state of your documentation. There is no manual step to update the index.

No configuration needed

Search works out of the box on every Docsio site. There is nothing to enable, configure, or pay for.