diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index dd79367dc25a2..52fbb08a3de21 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -68,7 +68,7 @@ const ConfigSchema = Joi.object({ .default(DEFAULT_CONFIG.onBrokenLinks), onBrokenMarkdownLinks: Joi.string() .equal('ignore', 'log', 'warn', 'error', 'throw') - .default(DEFAULT_CONFIG.onBrokenLinks), + .default(DEFAULT_CONFIG.onBrokenMarkdownLinks), onDuplicateRoutes: Joi.string() .equal('ignore', 'log', 'warn', 'error', 'throw') .default(DEFAULT_CONFIG.onDuplicateRoutes), diff --git a/website/docs/api/docusaurus.config.js.md b/website/docs/api/docusaurus.config.js.md index ac7ff9d5f8dd7..df2d56dfca247 100644 --- a/website/docs/api/docusaurus.config.js.md +++ b/website/docs/api/docusaurus.config.js.md @@ -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'` diff --git a/website/versioned_docs/version-2.0.0-alpha.66/api/docusaurus.config.js.md b/website/versioned_docs/version-2.0.0-alpha.66/api/docusaurus.config.js.md index ac7ff9d5f8dd7..df2d56dfca247 100644 --- a/website/versioned_docs/version-2.0.0-alpha.66/api/docusaurus.config.js.md +++ b/website/versioned_docs/version-2.0.0-alpha.66/api/docusaurus.config.js.md @@ -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'`