From 58199aed1f691ccb346fc2067793d0e285bb1a4f Mon Sep 17 00:00:00 2001 From: Amyr Ahmady Date: Sat, 31 Oct 2020 06:04:51 +0330 Subject: [PATCH] feat(v2): add `onBrokenMarkdownLinks` to API docs --- packages/docusaurus/src/server/configValidation.ts | 2 +- website/docs/api/docusaurus.config.js.md | 8 ++++++++ .../version-2.0.0-alpha.66/api/docusaurus.config.js.md | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) 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'`