Skip to main content

Search and user experience

An effective search function is crucial for making your documentation user-friendly and easy to navigate. Docusaurus offers powerful tools to improve search and interaction.

Docusaurus includes support for a search function that makes it easy for users to find the right content. The most common solution is Algolia DocSearch, a free service for publicly available documentation.

How it works

When Algolia DocSearch is enabled:

  1. Automatic indexing – Algolia crawls your site and creates a search index based on the content.
  2. Fast search results – Users get relevant results in real time as they type in the search box.
  3. Categorized results – Results are grouped, for example by documentation, blog posts, or other sections of the site.

Search customization options

Docusaurus lets you customize search to suit your needs. Here are a few examples:

  • Custom indices – If you do not use Algolia, you can implement your own solutions with other search engines.
  • Style the search box – Change the look of the search box with CSS or move it within the navigation.
  • Exclude content – Specify which pages or sections should not be indexed, such as internal or temporary pages.

User experience: Optimize for better search results

A good search function does not just make your documentation more accessible — it also improves the user experience. Here are a few tips:

  1. Write clear headings – Use informative and specific headings that help the search function find relevant content.

  2. Optimize with metadata – Add title and description to each page to help the search engine understand the content.

Example:

---
title: Introduction to APIs
description: An overview of the API structure and basic features.
---
  1. Create internal links – Link between related pages to help users explore more content.

  2. Test the search function – regularly check that search results are relevant. Adjust content if important pages do not show up as expected.


Next step – How you can customize Docusaurus with themes and interactive elements!