Gretyl's Portal

Heretto Help

Show Page Sections

Docusaurus Search

Add Algolia Search to Docusaurus Sites

You can integrate Algolia into Heretto Connector for Docusaurus static sites.

  1. Deploy a Heretto Connector for 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 Heretto Connector for 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 Customize Docusaurus Output.

Add Offline Search to Docusaurus Sites

You can integrate an offline search functionality into Heretto Connector for Docusaurus by adding the docusaurus-search-local search plugin for Docusaurus v2. The plugin is supported by the Docusaurus community. For more information and support, see https://docusaurus.io/community/resources#search.

Set up a local development environment. See Prepare a Local Docusaurus Development Workspace.
  1. In the full_project/package.json file, add the following code:
    "dependencies": {
       <!-- Add this code -->
       "@cmfcmf/docusaurus-search-local": "latest",
       <!-- End of add this code -->  
       "@docusaurus/core": "latest",

    For more information about the optional search configuration, see https://github.com/cmfcmf/docusaurus-search-local.

  2. Save the package.json file.
See Customize Docusaurus Output.