fix(plugin-algolia): should remove base#2949
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where Algolia search result URLs were not properly removing the base path, causing navigation issues in sites with custom base paths. The fix ensures that URLs passed to the Link component and navigate function are properly normalized by removing both the origin and the base path.
- Wraps the URL transformation with
removeBaseto strip the site's base path after removing the origin - Adds a TypeScript module declaration for '@docsearch/css' to fix type errors
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/plugin-algolia/src/runtime/Search.tsx | Imports removeBase and applies it to search result URLs after origin removal to ensure proper navigation |
| packages/plugin-algolia/src/env.d.ts | Adds module declaration for '@docsearch/css' to resolve TypeScript errors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 3 projects in monorepo, 1 project with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 webPath:
📦 Download Diff Report: web Bundle Diff Generated by Rsdoctor GitHub Action |
Summary
we already have basename, so pass the url without base to Link and navigate
should remove origin and base
Link
useNavigate
Related Issue
lynx-family/lynx-website#696
Checklist