WritedocsWritedocs

Search

Every site has search, built with the site: there’s no service to sign up for, no key, and nothing to configure. It runs in the reader’s browser, so it’s fast and works on any host.

Search is part of the published site. writedocs dev previews everything else, but its search box finds nothing.

Opening it

Click the search box in the topbar, or press ⌘K (Ctrl K on Windows and Linux) on any page. Up and Down move through the results, Enter opens one, and Escape closes search.

What it finds

  • Page content - the text of every page, with a match in the title ranked first. The sidebar, topbar and menus aren’t part of it, so results are always content.
  • Section names - each page is also found by the names of the tabs, versions, dropdowns and groups it’s in, so searching for a tab’s name finds its pages. Each result shows that trail under its title, like v2 › API reference › Webhooks.
  • API reference pages - every endpoint generated from an OpenAPI spec.

Versions, languages and products

On a site with versions, languages or products, search shows results from the ones the reader is on: a reader of v2 in English sees v2 pages in English, plus pages that are in no version, language or product. A line under the results says so, with a Search everything link that searches the whole site.

Hidden sections

Pages in a hidden section have a search of their own: it finds only their pages, and the rest of the site’s search never finds them. With searchPublic: true, their search finds the public pages too.

noindex pages

A page with seo.noindex in its frontmatter is still found by the site’s search - noindex is for search engines like Google. To keep pages out of the main search, put them in a hidden section.

Search inside a page

To filter a long table or list as the reader types, wrap it in a Searchbar.

Ask AI

To let readers ask questions and get answers from your docs, turn on the Ask AI widget - see Integrations.