mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
feat(v2): onBrokenMarkdownLinks config (#3658)
* refactor(v2): move `reportMessage` from `core/src/server/utils` to `utils` package * feat(v2): handle broken markdown links by using onBrokenLinks prop from siteconfig * feat(v2): add a new site config prop called `onBrokenMarkdownLinks` works like onBrokenLinks, but only for markdown links * feat(v2): add `onBrokenMarkdownLinks` to API docs * some changes regarding test issues after adding `onBrokenMarkdownLink` * Update website/versioned_docs/version-2.0.0-alpha.66/api/docusaurus.config.js.md Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
This commit is contained in:
parent
52e7511869
commit
8f2d898f22
18 changed files with 71 additions and 38 deletions
|
@ -108,6 +108,14 @@ The broken links detection is only available for a production build (`docusaurus
|
|||
|
||||
:::
|
||||
|
||||
### `onBrokenMarkdownLinks`
|
||||
|
||||
- Type: `'ignore' | 'log' | 'warn' | 'error' | 'throw'`
|
||||
|
||||
The behavior of Docusaurus, when it detects any broken markdown link.
|
||||
|
||||
By default, it prints a warning, to let you know about your broken markdown link, but you can change this security if needed.
|
||||
|
||||
### `onDuplicateRoutes`
|
||||
|
||||
- Type: `'ignore' | 'log' | 'warn' | 'error' | 'throw'`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue