Docusaurus Publishing Guide

Add Offline Search to Docusaurus Sites

You can integrate an offline search functionality into Docusaurus static sites.

Set up a local development environment. See Prepare a Local Docusaurus Development Workspace.
  1. In the full_project/docusaurus.config.js file, uncomment the following code:
    For more information about the docusaurus.config.js file, see Docusaurus Docs: docusaurus.config.js.
        // [require.resolve('@cmfcmf/docusaurus-search-local'), {
        //     indexDocs: true,
        //     docsRouteBasePath: '/',
        //     indexDocSidebarParentCategories: 3,
        //     indexPages: false,
        //     language: "en"
        // }]
  2. Save the docusaurus.config.js file.
See Develop a Docusaurus Template.