Skip to content

Fix/anchor check output#842

Merged
jth-nw merged 3 commits intodevfrom
fix/anchor-check-output
May 1, 2026
Merged

Fix/anchor check output#842
jth-nw merged 3 commits intodevfrom
fix/anchor-check-output

Conversation

@jth-nw
Copy link
Copy Markdown
Collaborator

@jth-nw jth-nw commented May 1, 2026

No description provided.

jth-nw and others added 3 commits May 1, 2026 11:19
Previously the output only showed file:line and the broken anchor name,
leaving the user to open both files to figure out what to change.

Now each error shows:
- the source line containing the broken link
- the broken anchor name and target file
- all available anchors in the target file

Example:
  docs/admin/page.md:25
    [See setup](overview.md#setup-the-agent)
    #setup-the-agent not found in docs/admin/overview.md
    Available: #overview · #install-the-agent · #configure-the-agent

Also fixes the error count in vale-autofix.yml, which used wc -l on the
error output — now inflated by the extra lines per error. Both count sites
now parse the "Found N" summary line from the script instead.

Generated with AI

Co-Authored-By: Claude Code <ai@netwrix.com>
Previously the script only checked anchors — broken file links were
silently skipped with "Docusaurus's job". Now it also reports links to
.md/.mdx files that don't exist on disk, caught at commit time rather
than at build time.

Non-markdown paths (images, PDFs, other assets) and external URLs are
still skipped; they're either Docusaurus's responsibility or not
resolvable locally.

Generated with AI

Co-Authored-By: Claude Code <ai@netwrix.com>
--staged mode only grepped for .md files, silently skipping .mdx source
files. Changed grep pattern to .mdx? to cover both.

Also updated two summary lines that still said "anchor links" after the
script was extended to check broken file links as well.

Generated with AI

Co-Authored-By: Claude Code <ai@netwrix.com>
@jth-nw jth-nw merged commit 031e19b into dev May 1, 2026
4 of 6 checks passed
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