Skip to content

fix(plugin-algolia): should remove base#2949

Merged
Timeless0911 merged 1 commit intomainfrom
syt/fix-algolia
Dec 30, 2025
Merged

fix(plugin-algolia): should remove base#2949
Timeless0911 merged 1 commit intomainfrom
syt/fix-algolia

Conversation

@SoonIter
Copy link
Copy Markdown
Member

Summary

we already have basename, so pass the url without base to Link and navigate

should remove origin and base

  1. Link

  2. useNavigate

Related Issue

lynx-family/lynx-website#696

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 30, 2025 07:54
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 30, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 7b30739
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/6953852d51d4140008563e84
😎 Deploy Preview https://deploy-preview-2949--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

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 removeBase to 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.

@github-actions
Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
node 9.3 MB 0
node_md 1.2 MB 0
web 15.1 MB +10.0 B (0.0%)
📋 Detailed Reports (Click to expand)

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: 899cac477c | PR: #2948

Metric Current Baseline Change
📊 Total Size 15.1 MB 15.1 MB +10.0 B (0.0%)
📄 JavaScript 14.4 MB 14.4 MB +10.0 B (0.0%)
🎨 CSS 128.4 KB 128.4 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 526.0 KB 526.0 KB 0

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

@Timeless0911 Timeless0911 merged commit ceda7ad into main Dec 30, 2025
16 checks passed
@Timeless0911 Timeless0911 deleted the syt/fix-algolia branch December 30, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants