From 0ecf83175c6c6f3bcee666a75240fe4d88571fd8 Mon Sep 17 00:00:00 2001 From: Alexey Karimov Date: Thu, 8 Oct 2026 18:48:00 +0500 Subject: [PATCH] ci(docs): fail the build on broken links and anchors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit onBrokenLinks/onBrokenAnchors were 'warn', so CI could not catch a dead internal link (the review found common /sdk// URLs returning 404 with nothing flagging it). The site currently has none, so switching to 'throw' costs nothing. Verified that the build exits 1 for a planted broken link and for a planted broken anchor. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Change-Id: Ied97ba3470257049131349b1b44c9589372b7217 --- docusaurus.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 367ac4e..7d1c781 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -18,8 +18,11 @@ const config: Config = { baseUrl: '/', trailingSlash: true, - onBrokenLinks: 'warn', - onBrokenAnchors: 'warn', + // Fail the build (and the PR check) on a dead internal link or #anchor instead of warning: + // with 'warn' a broken /sdk/... link reached production unnoticed. Old URLs that must keep working + // belong in the client-redirects list below, not in content. + onBrokenLinks: 'throw', + onBrokenAnchors: 'throw', markdown: { format: 'detect',