milesj / docusaurus-plugin-typedoc-api

Docusaurus plugin that provides source code API documentation powered by TypeDoc.
71 stars 25 forks source link

fix: Fix for reported broken links. #135

Closed boenrobot closed 8 months ago

boenrobot commented 8 months ago

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.

milesj commented 8 months ago

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