Skip to content

Update deprecated onBrokenMarkdownLinks config warning in Docusaurus v3.9.1 buildΒ #737

@ccamel

Description

@ccamel

Problem

During the build process with Docusaurus v3.9.1, the following warning is emitted:

Warning: The siteConfig.onBrokenMarkdownLinks config option is deprecated and will be removed in a future Docusaurus version.
Please migrate and move this option to siteConfig.markdown.hooks.onBrokenMarkdownLinks instead.

See the GitHub Actions log for details: https://github.com/axone-protocol/docs/actions/runs/18105930114/job/51520333696


Current Configuration

The deprecated option is set in docusaurus.config.js:

// https://github.com/axone-protocol/docs/blob/main/docusaurus.config.js
onBrokenMarkdownLinks: 'throw',

Proposed Solution

  • Migrate the onBrokenMarkdownLinks config from the root level to siteConfig.markdown.hooks.onBrokenMarkdownLinks as suggested by the warning message.
  • Test the build to confirm the warning is resolved.

References

Related code

docusaurus.config.js

// @ts-check
/** @type {import('@docusaurus/types').Config} */
const config = {
  ...
  onBrokenMarkdownLinks: 'throw',
  ...
  markdown: {
    mermaid: true
    // Move hooks config here as per Docusaurus config requirements
  },
  ...
};

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Status

βœ… Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions