Skip to content

docs: fix broken purchase and wiki links across all languages, add link-check CI - #58

Open
Chirag6722 wants to merge 1 commit into
Seeed-Projects:mainfrom
Chirag6722:fix/broken-doc-links
Open

docs: fix broken purchase and wiki links across all languages, add link-check CI#58
Chirag6722 wants to merge 1 commit into
Seeed-Projects:mainfrom
Chirag6722:fix/broken-doc-links

Conversation

@Chirag6722

Copy link
Copy Markdown

Closes #57

What this changes

Fixes every broken link I could find in the repository's markdown, in all five languages, and adds CI so the next one is caught by a check rather than by a user filing an issue (#3, #8, #13, #54 were all link fixes found by hand).

# Broken Fixed to Files
1 …/DIP-Servo-Motor-24V-120RPM-…-p-6660.html404 Damiao-4310-Actuator-Motor-p-6823.html DM readme.md, _es, _fr, _jp
2 Feishu link-safety wrapper → 404, with a " mid-URL that closed the href early https://de.aliexpress.com/item/1005012108314029.html README.md, _es, _Fr, _JP
3 wiki.seeedstudio.com/Sensor/IMU/404 Sensor_accelerometer/ all 5 top-level READMEs
4 [Amazon](amazon.com/…) — no scheme, resolved as a repo-relative path https://www.amazon.com/… DM readme.md, RS README.md, README_zh.md
5 readme.md/#about-power-supply — trailing slash makes it a directory readme.md#about-power-supply README.md, _Fr, _JP, _zh
6 badge/Framework-Isaac Sim-… (literal space) and badge/Documentation-📕-blue (raw emoji) %20 / %F0%9F%93%95 all 5 top-level READMEs

The DM4310 replacement is the same motor at the same price the BOM already states ($120.00/unit, 4 per arm) — it is the single link most likely to stop a build, so it is worth a maintainer's second look.

The CI part

.github/workflows/link-check.yml runs lychee on pull requests touching **/*.md and weekly on Monday. Notes on the configuration:

  • --root-dir "$(pwd)" is required here — the READMEs link to repository-root paths like /hardware/… and /community/…, which otherwise resolve against the filesystem root.
  • --accept 200,206,403,429: several stores answer datacentre IPs with 403/429. A delisted product still answers 404, which is what this job exists to catch.
  • .lycheeignore excludes hosts that block CI runners outright (Amazon, AliExpress, Taobao, Tmall, X, LinkedIn, Instagram, Kaggle, Discord invites). Without it the job would be permanently red and therefore ignored. That is 95 of the 203 external URLs; the remaining 108 — Seeed store pages, the Seeed wiki, GitHub repos, shields.io — are the ones that actually go stale in a way CI can detect.
  • Both actions are SHA-pinned, matching ci: pin star-history workflow actions to commit SHAs and scope its token #56.

Anchor checking (--include-fragments) is deliberately left off for now: heading anchors in the CJK and emoji-heavy documents are the most likely source of false positives, and I would rather this check start out trustworthy. Easy to add later.

Verification

  • Link audit, before: an independent Python checker over all 19 markdown files found the six classes above — 203 unique external URLs and 915 relative targets scanned.
  • Link audit, after: the same checker, now applying .lycheeignore and the workflow's accept-list, reports 0 broken out of 108 checked external URLs and 0 broken out of 915 relative targets. That is the state the workflow should reproduce on its first run.
  • Replacement URLs were each opened and confirmed: the p-6823 listing shows "Damiao 4310 Actuator Motor" at $120.00; Sensor_accelerometer returns 200 with title "Sensor - Accelerometer"; both badge URLs return 200 image/svg+xml.
  • Anchor targets for fix update performance_Testing md #5 exist in the linked files (### About Power Supply, ### 关于电源).
  • actionlint v1.7.12 passes on the new workflow — exit 0, no findings.

Not verified by a live run: GitHub does not register workflows on a fresh fork without enabling them through the Actions UI, so I could not execute the lychee job itself; the checks above are the closest equivalent I could run locally. The AliExpress destination in fix #2 is the decoded target of the wrapper URL — AliExpress blocks this environment, so I could not confirm the listing is still live, only that the link as written today is broken.

🤖 Generated with Claude Code

Every link in every markdown file was checked (203 unique external URLs,
915 relative paths). Six classes of breakage, each repeated across the
translated copies:

- DM4310(V4) motor: seeedstudio p-6660 is 404 since the product was
  relisted. Now points at Damiao-4310-Actuator-Motor-p-6823, whose
  $120.00 price matches the BOM line.
- AliExpress purchase link: pasted out of a Feishu sheet, so it pointed
  at Feishu's link-safety interstitial (now 404) and the paste duplicated
  part of the query string, closing the href attribute early. Replaced
  with the decoded destination.
- IMU/gyroscope wiki link: no Sensor/IMU/ path exists on the wiki; the
  live category hub is Sensor_accelerometer.
- Four Amazon links had no scheme, so markdown resolved them as relative
  paths under the repo and all 404'd.
- Power-supply anchors used readme.md/#about-power-supply; the trailing
  slash turns a file reference into a directory reference.
- Two shields.io badge URLs contained characters that need escaping (a
  literal space, and a raw emoji).

Add .github/workflows/link-check.yml (lychee, SHA-pinned) on markdown
pull requests and weekly, plus .lycheeignore for the marketplaces and
social platforms that block CI runners outright.

Closes Seeed-Projects#57

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

Broken purchase and documentation links across all five READMEs, and no CI to catch them Discord link

1 participant