Skip to content

Commit 5f8b45c

Browse files
authored
fix(config): migrate onBrokenMarkdownLinks to markdown.hooks (#36)
This PR migrates the onBrokenMarkdownLinks configuration from the top-level config to markdown.hooks.onBrokenMarkdownLinks to fix the deprecation warning and ensure compatibility with Docusaurus v4. The deprecated top-level configuration was causing the following warning during the build process: ``` [WARNING] The `siteConfig.onBrokenMarkdownLinks` config option is deprecated and will be removed in Docusaurus v4. Please migrate and move this option to `siteConfig.markdown.hooks.onBrokenMarkdownLinks` instead. ``` This change follows the recommended migration path by moving the setting to the new location under markdown.hooks while maintaining the same behavior (throwing on broken markdown links). Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
1 parent 3ca3c04 commit 5f8b45c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

website/docusaurus.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const config: Config = {
3030
deploymentBranch: 'gh-pages',
3131

3232
onBrokenLinks: 'throw',
33-
onBrokenMarkdownLinks: 'throw',
3433

3534
// Even if you don't use internationalization, you can use this field to set
3635
// useful metadata like html lang. For example, if your site is Chinese, you
@@ -179,6 +178,9 @@ const config: Config = {
179178
allowComments: true,
180179
allowHtml: true,
181180
},
181+
hooks: {
182+
onBrokenMarkdownLinks: 'throw',
183+
},
182184
},
183185
prism: {
184186
theme: prismThemes.github,

0 commit comments

Comments
 (0)