-
-
Notifications
You must be signed in to change notification settings - Fork 10k
Update documentation on broken link detection #11520 #11521
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -293,6 +293,14 @@ The behavior of Docusaurus when it detects any broken link. | |
|
|
||
| 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`. | ||
|
|
||
| To opt out of a broken link, add the HTML attribute `data-noBrokenLinkCheck` to the element that contains the link: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 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 |
||
|
|
||
| ```jsx | ||
| <Link to="/broken-link" data-noBrokenLinkCheck>Link</Link> | ||
| ``` | ||
|
|
||
| :::note | ||
|
|
||
| The broken links detection is only available for a production build (`docusaurus build`). | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-pageafter creating apages/my-page.mdfile