Skip to content

fix(doc): ignore all localhost URLs in the dead-link check#1734

Closed
kixelated wants to merge 1 commit into
mainfrom
claude/fix-doc-localhost-deadlink
Closed

fix(doc): ignore all localhost URLs in the dead-link check#1734
kixelated wants to merge 1 commit into
mainfrom
claude/fix-doc-localhost-deadlink

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

The Check workflow is failing on every PR (including unrelated ones) because the VitePress doc build dies on a dead link:

moq-doc build: (!) Found dead link http://localhost:4443/certificate.sha256 in file setup/windows.md
x Build failed

#1732 ("Windows support") added an autolink to http://localhost:4443/certificate.sha256 in doc/setup/windows.md. VitePress can't reach that localhost URL at build time, so the dead-link check fails. The config already exempts http://localhost:5173, but not :4443.

Fix

Generalize the existing localhost exemption from a single literal to a regex matching any localhost URL (any port/path), so development-example links don't break the build going forward:

ignoreDeadLinks: [
  /^https?:\/\/localhost(:\d+)?(\/|$)/,
],

Validation

cd doc && bun run build (via nix develop) now completes (✓ building, ✓ rendering pages) with no dead-link error. Biome clean.

This unblocks CI for all open PRs.

(Written by Claude)

🤖 Generated with Claude Code

PR #1732 added an autolink to http://localhost:4443/certificate.sha256 in
setup/windows.md, which VitePress can't reach at build time, failing the doc
build (and every PR's `just ci`). Generalize the existing localhost exemption
from a single :5173 literal to a regex covering any localhost URL, so dev-example
links don't break the build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c27428d5-42f3-4ce6-ba3a-2a12cc0bddab

📥 Commits

Reviewing files that changed from the base of the PR and between 39c1ef7 and 890fa76.

📒 Files selected for processing (1)
  • doc/.vitepress/config.ts

Walkthrough

The VitePress ignoreDeadLinks configuration in doc/.vitepress/config.ts is updated to replace a single hardcoded http://localhost:3000 URL entry with a regular expression that matches any http:// or https:// localhost link, optionally including a port number. The accompanying comments are revised to note that these localhost URLs appear intentionally in development examples and are unreachable at build time.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: generalizing the localhost URL exemption in the dead-link check configuration from a single port to any localhost URL.
Description check ✅ Passed The description is directly related to the changeset, explaining the problem (failing CI due to localhost dead links), the fix (regex-based localhost exemption), and validation steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/fix-doc-localhost-deadlink

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

kixelated added a commit that referenced this pull request Jun 14, 2026
PR #1732 added an autolink to http://localhost:4443/certificate.sha256 in
setup/windows.md, which VitePress can't reach at build time, failing the doc
build (and every PR's `just ci`). Generalize the existing localhost exemption
from a single :5173 literal to a regex covering any localhost URL.

Folded in here so this PR is green on its own; supersedes #1734.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Folded into #1733 so that PR is green on its own. Closing this one. (Written by Claude)

@kixelated kixelated closed this Jun 14, 2026
@kixelated
kixelated deleted the claude/fix-doc-localhost-deadlink branch June 14, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant