Update documentation on broken link detection #11520#11521
Conversation
Clarify broken link detection behavior and opt-out method.
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
||
| By default, it throws an error, to ensure you never ship any broken link. | ||
|
|
||
| Broken link detection only applies to relative links within a plugin, it does not work across plugins nor on pages specified in `/pages` or `static`. |
There was a problem hiding this comment.
That's not really accurate. It's unclear to me what it means to "not work across plugins", and it definitively works if you link to /my-page after creating a pages/my-page.md file
|
|
||
| Broken link detection only applies to relative links within a plugin, it does not work across plugins nor on pages specified in `/pages` or `static`. | ||
|
|
||
| To opt out of a broken link, add the HTML attribute `data-noBrokenLinkCheck` to the element that contains the link: |
There was a problem hiding this comment.
this is not an HTML attribute (although it's technically legal to pass any data attribute to HTML elements), it is a proprietary React component prop of the Docusaurus <Link> component
As explained here, we don't document it on purpose, and only share this secret API after having clearly understood why a user need it
|
I'd rather not merge this in docs for now, since it's supposed to work out of the box and I want to know when it doesn't. Being aware of problems help us fix the bugs we have. |
Clarify broken link detection behavior and opt-out method.