Skip to content

feat: the Docusaurus search is disabled or using default search β€” add Algolia DocSearch or local search so users can find tutorials without scrolling through the entire docs treeΒ #1965

Description

@divyanshim27

πŸš€ Problem Statement

RecodeHive is an educational platform with content across docs/, blog/, community/, and wiki/. The docusaurus.config.ts does not appear to configure a search provider. Docusaurus 3 ships without a built-in search β€” users must browse the sidebar tree manually to find tutorials.

For a learning platform where users come with specific questions ("how do I cherry-pick a commit?", "what is a rebase?"), the lack of search is a critical discoverability gap. Users who can't find content quickly leave.

Proposed Fix

Option A: Algolia DocSearch (Free for open-source projects, recommended)

Apply at https://docsearch.algolia.com/apply/ (RecodeHive qualifies as an open-source educational site). After approval, add to docusaurus.config.ts:

// docusaurus.config.ts
themeConfig: {
  algolia: {
    appId: 'YOUR_APP_ID',
    apiKey: 'YOUR_SEARCH_API_KEY',
    indexName: 'recodehive',
    contextualSearch: true,
  },
},

Option B: @easyops-cn/docusaurus-search-local (No external service, works offline)

npm install @easyops-cn/docusaurus-search-local
// docusaurus.config.ts
plugins: [
  [
    require.resolve('@easyops-cn/docusaurus-search-local'),
    {
      hashed: true,
      language: ['en'],
      docsRouteBasePath: '/docs',
      blogRouteBasePath: '/blog',
    },
  ],
],

Option B is ready to implement without external approvals. It generates a local search index at build time and works without an Algolia account.

Files to Modify

File Change
package.json Add @easyops-cn/docusaurus-search-local (for Option B)
docusaurus.config.ts Configure search provider
README.md Document search setup

Suggested labels: enhancement, frontend, UX

I would like to work on this. Could you please assign it to me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    level 110 pointsrecodethis is label for leaderboard

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions