You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: make validate passes with dead /rules/<cat>/<slug> links; add an internal link check to the docs gate #322
While rewriting the rule docs (#315) a batch shipped /rules/performance/<slug> hrefs for pages that live at /rules/perf/<slug>. cd docs && make validate (tangly check --strict) reported "All checks passed" with those dead links in place. The lane caught it with its own script (every /rules/<cat>/<slug> link must resolve to docs/rules/<cat>/<slug>.mdx).
Acceptance Criteria
make validate in docs/ fails on any internal markdown link whose target page does not exist (relative and absolute /path links, with and without anchors).
The check runs in the public CI "Docs check and build" job.
A test fixture or a documented manual repro shows the failure on a dead link and the pass on a fixed one.
If tangly has a flag or config for this, it is enabled and documented in docs/README instead of a custom script.
Checked against current main (ad95fb2): STILL TRUE, and bumping tangly will not fix it.
On a three-page fixture, tangly check --strict 0.5.0 (pinned in docs/package.json) and 0.5.2 (npm latest) both pass [d](/rules/performance/real) where only /rules/perf/real exists. They also pass ./nope-rel, <Card href="/nope-card"> and a dead #anchor. In 0.5.0, dist/cli/commands/check.js validates only the manifest and MDX syntax. Its --no-links option is declared and never read, and nothing else checks links in page bodies.
That answers criterion 4: tangly has no flag or config for this, so the check has to be a script in the "Docs check and build" job. The anchor half is #649, and one script could cover both.
Fixed in #876 (bb528c3). make validate and bun run docs:check, which the CI "Docs check and build" job runs, now run docs/scripts/check-links.ts after tangly check --strict. It fails on an internal link (absolute, relative or same-page, with or without an anchor) whose target is not a page, a redirect or a file. docs/scripts/check-links.test.ts has fixtures for a dead absolute link, a dead relative link and /rules/performance/<slug>, plus passing cases. The last criterion does not apply: tangly 0.5.0 and 0.5.2 have no flag or config for it (a probe with dead links passed --strict), and CONTRIBUTING.md documents the script.
Activity
nc9 commentedon Oct 11, 2026
Checked against current main (ad95fb2): STILL TRUE, and bumping tangly will not fix it.
On a three-page fixture,
tangly check --strict0.5.0 (pinned indocs/package.json) and 0.5.2 (npmlatest) both pass[d](/rules/performance/real)where only/rules/perf/realexists. They also pass./nope-rel,<Card href="/nope-card">and a dead#anchor. In 0.5.0,dist/cli/commands/check.jsvalidates only the manifest and MDX syntax. Its--no-linksoption is declared and never read, and nothing else checks links in page bodies.That answers criterion 4: tangly has no flag or config for this, so the check has to be a script in the "Docs check and build" job. The anchor half is #649, and one script could cover both.
build(docs): fail docs:check on dead internal links, dead #anchors, m…
build(docs): link check skips only the top-level scripts dir, matches…
build(docs): link check strips tags without a regex, reads only Type/…
build(docs): fail docs:check on dead internal links, dead #anchors, m…
build(docs): link check skips only the top-level scripts dir, matches…
build(docs): link check strips tags without a regex, reads only Type/…
nc9 commentedon Oct 16, 2026
Fixed in #876 (bb528c3).
make validateandbun run docs:check, which the CI "Docs check and build" job runs, now rundocs/scripts/check-links.tsaftertangly check --strict. It fails on an internal link (absolute, relative or same-page, with or without an anchor) whose target is not a page, a redirect or a file.docs/scripts/check-links.test.tshas fixtures for a dead absolute link, a dead relative link and/rules/performance/<slug>, plus passing cases. The last criterion does not apply: tangly 0.5.0 and 0.5.2 have no flag or config for it (a probe with dead links passed--strict), and CONTRIBUTING.md documents the script.