Skip to content

[Don't merge] feat: implemented algolia search with custom improvements#844

Open
molok0aleks99 wants to merge 3 commits intomainfrom
feature/we-2199-research-better-options-for-docslidofi-search-engine
Open

[Don't merge] feat: implemented algolia search with custom improvements#844
molok0aleks99 wants to merge 3 commits intomainfrom
feature/we-2199-research-better-options-for-docslidofi-search-engine

Conversation

@molok0aleks99
Copy link
Copy Markdown
Contributor

Please, go through these steps before you request a review:

📝 Describe your changes

  1. Implemented algolia search with custom improvements

Waiting for a secops review

Copy link
Copy Markdown
Member

@tamtamchik tamtamchik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gg, but some questions

],
},
algolia: {
appId: 'A2HCNXVT4O',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to expose it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the search-only Application ID, it's designed to be public and used on the client side. Algolia explicitly documents that appId is safe to expose in frontend code.

appId: 'A2HCNXVT4O',
// TODO: put your own api key
apiKey: '',
indexName: 'dev_LIDO_DOCS',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be configurable?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Algolia-powered search to the Docusaurus docs site, including a custom /search page, client-side UX improvements for the DocSearch modal, and tooling/docs for generating and tuning Algolia records/ranking.

Changes:

  • Configure Algolia DocSearch in docusaurus.config.js and add client modules for query persistence + on-page highlighting.
  • Add a swizzled SearchPage implementation with URL deduplication, snippets, and custom styling.
  • Introduce an Algolia record generation script plus a detailed “search rules” playbook; ignore generated artifacts in .gitignore.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/theme/SearchPage/styles.module.css New CSS module styles for the custom search page UI and result highlighting.
src/theme/SearchPage/index.tsx Swizzled search page implementation using Algolia helper, dedup logic, snippet rendering, and UI layout.
src/css/custom.css Global styles for search-term highlighting on target pages and DocSearch modal selection behavior.
src/clientModules/searchQueryPersist.js Client module to persist DocSearch modal queries and manage Enter/selection behavior.
src/clientModules/searchHighlight.js Client module to highlight search terms on navigated-to doc pages and fade them out.
src/clientModules/search-rules.md Documentation describing ranking rules and verification queries for Algolia tuning.
scripts/generate-algolia-records.js Script to generate DocSearch-compatible records from the built site HTML plus custom ranking fields.
docusaurus.config.js Enables Algolia config and registers the new client modules; comments out local search plugin.
.gitignore Ignores Algolia PoC artifacts and an Algolia env file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@molok0aleks99 molok0aleks99 requested a review from a team as a code owner April 8, 2026 09:27
…99-research-better-options-for-docslidofi-search-engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants