Update documentation on broken link detection

Clarify broken link detection behavior and opt-out method.
This commit is contained in:
Warren Parad 2025-10-30 11:54:23 +01:00 committed by GitHub
parent f8bedbd0a0
commit 98e31bb7fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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:
```jsx
<Link to="/broken-link" data-noBrokenLinkCheck>Link</Link>
```
:::note
The broken links detection is only available for a production build (`docusaurus build`).