-
Notifications
You must be signed in to change notification settings - Fork 37
[WIP]: Investigate algolia as a search replacement #2333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
| run: npm run serve -w website -- --port 3000 & | ||
|
|
||
| - name: Wait for server | ||
| uses: grafana/plugin-actions/wait-for-grafana@wait-for-grafana/v1.0.2 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
Uses Step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This WIP pull request investigates replacing the current Lunr-based search with Algolia search for the Docusaurus documentation site. The changes include removing the docusaurus-lunr-search plugin, adding Algolia's search SDK, creating crawling scripts to generate search indices, and updating the configuration to use Algolia's DocSearch integration.
Key changes:
- Replaces Lunr search with Algolia DocSearch integration
- Adds crawling infrastructure using Crawlee to generate Algolia search indices
- Updates environment configuration and deployment workflows for testing
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package-lock.json | Updates dependencies: removes docusaurus-lunr-search, adds algoliasearch 5.45.0 and crawlee 3.15.3 |
| docusaurus/website/package.json | Adds algoliasearch and crawlee dependencies, removes docusaurus-lunr-search, adds generate-index script |
| docusaurus/website/docusaurus.config.ts | Removes lunr-search plugin config, adds Algolia DocSearch configuration with environment variables |
| docusaurus/website/.env.production | Adds Algolia environment variables (app ID, API key, index name) |
| docusaurus/website/.env.development | Adds Algolia environment variables for development |
| docusaurus/website/scripts/algolia/crawl.ts | New script to crawl documentation site and generate Algolia-formatted records |
| docusaurus/website/scripts/algolia/uploadToAlgolia.ts | New script to upload records to Algolia index |
| docusaurus/website/scripts/algolia/types.ts | TypeScript type definitions for Algolia DocSearch records |
| docusaurus/website/src/theme/tracking/index.ts | Removes search tracking initialization |
| docusaurus/website/src/css/custom.css | Comments out old search styles, adds Algolia DocSearch dark theme styles |
| .gitignore | Adds storage directory to gitignore |
| .github/workflows/deploy-to-developer-portal-dev.yml | Temporarily disables deployment, adds server startup for testing crawl script |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const record = { objectID: 'object-1', name: 'test record' }; | ||
|
|
||
| // Add record to an index | ||
| const { taskID } = await client.saveObject({ |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable taskID.
| const { taskID } = await client.saveObject({ | |
| await client.saveObject({ |
| const parsedUrl = new URL(request.url); | ||
| const basePath = '/developers/plugin-tools/'; | ||
| let pathname = parsedUrl.pathname; | ||
|
|
||
| if (pathname.startsWith(basePath)) { | ||
| pathname = pathname.slice(basePath.length); | ||
| } | ||
|
|
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value assigned to pathname here is unused.
| const parsedUrl = new URL(request.url); | |
| const basePath = '/developers/plugin-tools/'; | |
| let pathname = parsedUrl.pathname; | |
| if (pathname.startsWith(basePath)) { | |
| pathname = pathname.slice(basePath.length); | |
| } |
df704c4 to
df9e674
Compare
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: