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

Generates wrong links with Docusaurus 3.4.0 #82

Open
bbhtt opened this issue Jul 15, 2024 · 3 comments
Open

Generates wrong links with Docusaurus 3.4.0 #82

bbhtt opened this issue Jul 15, 2024 · 3 comments

Comments

@bbhtt
Copy link

bbhtt commented Jul 15, 2024

It is generating wrong links for example searching for "linter errors" and clicking the first result should go to https://docs.flathub.org/docs/for-app-authors/linter#linter-errors but the generated link goes to https://docs.flathub.org/docs/for-app-authors/linter/docs/for-app-authors/linter#linter-errors

@slorber
Copy link

slorber commented Jul 18, 2024

Search index before/after, the h attribute looks wrong and should probably not contain the pathname?

CleanShot 2024-07-18 at 15 27 32@2x

This probably happens because the anchor now includes the pathname on Docusaruus side:

CleanShot 2024-07-18 at 15 31 45@2x

While it wasn't the case before:

CleanShot 2024-07-18 at 15 33 18@2x

Although I wonder why our anchors have changed this way (will investigate) I think the bug is in this plugin that should support anchor links containing a pathname, which remains a perfectly valid anchor.

We'll probably need to introduce these kind of links on purpose on the blog to solve bugs like this: facebook/docusaurus#10287

@slorber
Copy link

slorber commented Jul 18, 2024

Going to revert the unexpected Docusaurus change for now, but this only buys you time to fix the problem in this plugin because it remains a bug, and we'll have anchor links with a pathname in the future.

facebook/docusaurus#10311

@bbhtt
Copy link
Author

bbhtt commented Jul 24, 2024

Search index before/after, the h attribute looks wrong and should probably not contain the pathname?

I tried to fix it with #83 but didn't seem to work and I'm not very familiar with docusaurus too.

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

No branches or pull requests

2 participants