[Don't merge] feat: implemented algolia search with custom improvements#844
Open
molok0aleks99 wants to merge 3 commits intomainfrom
Open
[Don't merge] feat: implemented algolia search with custom improvements#844molok0aleks99 wants to merge 3 commits intomainfrom
molok0aleks99 wants to merge 3 commits intomainfrom
Conversation
tamtamchik
reviewed
Mar 16, 2026
docusaurus.config.js
Outdated
| ], | ||
| }, | ||
| algolia: { | ||
| appId: 'A2HCNXVT4O', |
Contributor
Author
There was a problem hiding this comment.
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.
docusaurus.config.js
Outdated
| appId: 'A2HCNXVT4O', | ||
| // TODO: put your own api key | ||
| apiKey: '', | ||
| indexName: 'dev_LIDO_DOCS', |
Contributor
There was a problem hiding this comment.
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.jsand add client modules for query persistence + on-page highlighting. - Add a swizzled
SearchPageimplementation 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.
…99-research-better-options-for-docslidofi-search-engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please, go through these steps before you request a review:
📝 Describe your changes
Waiting for a secops review