Skip to content
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

Fixed search link when update to Docusaurus 3.4.0 #410

Merged
merged 4 commits into from
Jun 4, 2024
Merged

Fixed search link when update to Docusaurus 3.4.0 #410

merged 4 commits into from
Jun 4, 2024

Conversation

anonid-top
Copy link
Contributor

Fix both search page and search bar with footer link to search page - AnonID.TOP

…ge and search bar with footer link to search page - AnonID.TOP
Copy link

netlify bot commented Jun 4, 2024

Deploy Preview for easyops-cn-docusaurus-search-local ready!

Name Link
🔨 Latest commit f644bcf
🔍 Latest deploy log https://app.netlify.com/sites/easyops-cn-docusaurus-search-local/deploys/665ebef26d58d300090b40e0
😎 Deploy Preview https://deploy-preview-410--easyops-cn-docusaurus-search-local.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 site configuration.

@weareoutman
Copy link
Member

Hi thanks for finding out what's wrong with issue #408 , but we'd better make the h in the search index file to be trimmed instead, to save network transfer size when searching on the page.

That's:

const hash = $h.find("a.hash-link").attr("href") || "";

@anonid-top
Copy link
Contributor Author

Hi thanks for finding out what's wrong with issue #408 , but we'd better make the h in the search index file to be trimmed instead, to save network transfer size when searching on the page.

That's:

const hash = $h.find("a.hash-link").attr("href") || "";

It's okay, it took me all night to understand how your code works, figure out how to get rid of the redundancy in the h value, and that's the best I could find and do. It's great that you have a better and more optimal solution. Thank you for your solution.

@weareoutman
Copy link
Member

Yes, the codebase is quite complex. I'll try to do the fix based on your PR, since I have some other considerations about this fix.

@anonid-top
Copy link
Contributor Author

Yes, the codebase is quite complex. I'll try to do the fix based on your PR, since I have some other considerations about this fix.

Okey, if we don't use file link in h value, remove it in h is best choise for search performance

@weareoutman weareoutman enabled auto-merge (squash) June 4, 2024 07:18
@weareoutman weareoutman merged commit 408e08f into easyops-cn:master Jun 4, 2024
6 checks passed
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