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

fix: Fix for reported broken links. #135

Merged
merged 1 commit into from
Feb 11, 2024
Merged

Conversation

boenrobot
Copy link
Contributor

@boenrobot boenrobot commented Feb 10, 2024

When running Docusaurus with this plugin, all links are erroneously reported as broken. That's because "id" attributes on vanilla HTML elements are not automatically collected by Docusaurus. This PR fixes that by informing Docusaurus about the new anchor (the span with the id attribute) generated by the AnchorLink component.

And also I switched out the vanilla "a" for Docusaurus' Link component, for consistency mostly.

…ut anchors produced by this plugin.

fix(AnchorLink): Anchor links now use Docusaurus's Link component, instead of a vanilla "a".
@milesj milesj changed the title Fix for reported broken links fix: Fix for reported broken links. Feb 10, 2024
@milesj
Copy link
Owner

milesj commented Feb 10, 2024

@boenrobot Thanks for this, I wasn't sure what the actual fix was supposed to be

@milesj milesj merged commit fb43b78 into milesj:master Feb 11, 2024
10 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.

None yet

2 participants