Skip to content

Fix browser-relative route validation in link checker

Created by: ihsraham

Summary

  • Update the MDX link checker to resolve relative docs routes the same way exported trailing-slash pages resolve them in the browser.
  • Convert affected relative docs links to root-relative routes so generated pages do not resolve one level too deep.
  • Cover the AI, MCP Toolkit, Fiat, Lending, Indexer API, UI Kit, and Swidge links that the stricter checker now validates correctly.

Root Cause

The static export uses trailingSlash: true, so a rendered link like href="openclaw" on /ai/agent-skills/ resolves to /ai/agent-skills/openclaw/ in the browser. The custom checker was resolving the same MDX source link from the source parent route, treating it as /ai/openclaw, so the quality gate missed real 404s.

Validation

Node 22.22.2 / npm 10.9.7 from a clean upstream/develop worktree:

  • npm ci
  • git diff --check
  • npm run check:meta
  • npm run check:redirects
  • LINK_CHECK_EXTERNAL=false npm run check:links - 232 files, 2065 links, 0 errors
  • npm run build - passed, rendered-link crawler found 0 broken links
  • Custom rendered HTML audit - broken unique=0
  • npm run quality - passed; external-link warnings were 403/redirect informational results, with 0 broken links

Merge request reports