fix(docs): fix broken license URLs + SPDX casing + sourceforge exclusion#276
Open
ronaldtse wants to merge 1 commit into
Open
fix(docs): fix broken license URLs + SPDX casing + sourceforge exclusion#276ronaldtse wants to merge 1 commit into
ronaldtse wants to merge 1 commit into
Conversation
Three issues causing link_checker failures on v5: 1. SPDX URL casing (generate.js): spdx_license field was uppercased before building spdx.org URLs. SPDX URLs are case-sensitive: 'Bitstream-Vera.html' works, 'BITSTREAM-VERA.html' returns 404. Fix: use original YAML casing for URL construction, keep uppercased version for comparison/matching only. 2. Dead Monotype license URLs (47 formula YAMLs): the license_url field pointed to http://www.monotype.com/html/type/license.html which 404s. Replaced with the only available archive.org snapshot (1998). 14 HK-variant files (monotype.com.hk) had no archive snapshot and were removed — license text is preserved in open_license. Also fixed office_preview.yml (monotype.com/html/mtname/ms_welcome.html). 3. SourceForge download URLs (lychee.toml): *.sourceforge.net mirrors rate-limit or block GitHub Actions IPs, causing false failures. Added exclusion — these URLs are verified by Tier 2 install tests.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
link_checkerjob has been failing onv5itself (not just feature branches), causing a red X on every docs PR. Three root causes identified and fixed.Fixes
1. SPDX URL casing bug (
docs/generate.js)The
spdx_licensefield from YAML was.toUpperCase()'d for comparison, but the uppercased value was also used to constructspdx.org/licenses/*.htmlURLs. SPDX URLs are case-sensitive:Bitstream-Vera.html→ 200 ✅BITSTREAM-VERA.html→ 404 ❌Fix: preserve original YAML casing (
spdxLicenseRaw) for URL construction, keep uppercased version for comparison only. Affects 8 URL templates (CC0, CC-BY, CC-BY-SA, GPL, LGPL, UFL, IPA, and the generic fallback).2. Dead Monotype license URLs (48 formula YAMLs)
47 formulas had
license_url: http://www.monotype.com/html/type/license.htmlwhich 404s (the page was reorganized; both HTTP and HTTPS are dead).Fix: replaced with the only available archive.org snapshot:
Also fixed:
monotype.com.hk) — no archive snapshot exists;license_urlfield removed (license text preserved inopen_license)office_preview.yml— deadmonotype.com/html/mtname/ms_welcome.html→ archive.org snapshot (1999)3. SourceForge exclusion (
docs/lychee.toml)*.sourceforge.netdownload mirrors rate-limit or block GitHub Actions IPs, causing false failures on ~14 MS core font download URLs.Fix: added
exclude = ["https://[^/]*\\.sourceforge\\.net"]to lychee config. These URLs are verified by the formula-health Tier 2 installation tests, not by the link checker.Files
docs/generate.js— SPDX casing fix (8 URL templates)docs/lychee.toml— sourceforge exclusionlicense_url→ archive.org snapshotlicense_urlremoved (no archive available)office_preview.yml) —license_url→ archive.org snapshotcourier.yml) —license_url→ archive.org snapshot