Add Algolia Search to Docusaurus Sites

You can integrate Algolia into Docusaurus static sites.

  1. Deploy a Docusaurus static site to a public server. For more information, see Publish Content with Docusaurus.
  2. Obtain the Algolia API key and index name. For more information, see https://docsearch.algolia.com/docs/what-is-docsearch.
  3. 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.
    themeConfig: {
    //    algolia: {
    //      apiKey: algolia_api_key,
    //      indexName: index_name,
    //    },
    full_project
    The location of your local Docusaurus project.
    algolia_api_key
    Is your Algolia API key.
    index_name
    Is your Algolia index name.
  2. Save the docusaurus.config.js file.
See Develop a Docusaurus Template.