Skip to Content
🚧 This is WIP documentation for Nextra 4.0
DocumentationGuideSearch Engine

Search Engine

Nextra features full-page search, that includes list items, code blocks, headings and table cells.

Nextra indexes your content automatically at build-time and performs incredibly fast full-text search via FlexSearch .

Configuration

nextraConfig.search

  • Type: boolean | { codeblocks: boolean }
  • Default: true

Example

next.config.mjs
import nextra from 'nextra' const withNextra = nextra({ search: { codeblocks: false } })

Search in Code Blocks

Inline <code attr="foo" /> can be searched as well as code blocks.

<code>I'm Searchable!</code>
💡
Tip

To disable search in code blocks set search: { codeblocks: false }

Last updated on