mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 01:28:35 -05:00
fix(links): suppress link-rot tracker noise + remove gitignored .claude link
Two surgical fixes for the nightly link-rot tracker (#1424): 1. **shared/config/.lycheeignore**: add two patterns that suppress confirmed false positives reported in the tracker. - JS template literals (`${m.github}`): when Lychee parses a .qmd containing JavaScript with template literals like `https://github.com/${m.github}`, the literal is URL-encoded in the AST as `$%7B…%7D` and reported as broken. The literal is substituted at runtime; it is never a real URL. Pattern matches any `${ANY.ANY}` template-literal residue. - GitHub avatar URLs (`github.com/<user>.png?size=N`): manually verified that every avatar URL flagged by the tracker (profvjreddi, Mjrovai, etc.) returns 200 in a browser. Lychee unreliably HEADs them due to GitHub's avatar throttling. Together these cover the 8 remaining "broken" links on the Unified Site that are not real failures. 2. **slides/teaching.qmd**: replace a markdown link to `.claude/rules/svg-style.md` with plain prose. The `.claude/` directory is gitignored in this repo, so the URL github.com/harvard-edge/cs249r_book/blob/main/.claude/rules/svg-style.md 404s. Mention the SVG style guide in prose without the broken link. Out of scope for this patch: the 329 `tinyMLx/courseware/raw/master/...` links in slides/, which point to PDFs that don't exist in the upstream repo (the directory exists, but the specific file numbers don't). That is a content/strategic question — needs a decision on whether to upload missing PDFs, switch repos, or remove the links — and is left for a separate workstream.
This commit is contained in:
@@ -33,3 +33,18 @@
|
||||
# Lychee treats anything after # as a fragment to verify, but for these
|
||||
# single-page-apps the # is part of the URL semantics. Skip fragment check.
|
||||
^https://star-history\.com/#
|
||||
|
||||
# --- Unrendered JS template literals (false positives) ---
|
||||
# When Lychee parses a .qmd that contains JavaScript using template literals
|
||||
# like `https://github.com/${m.github}`, the template literal is URL-encoded
|
||||
# in the AST as `$%7B…%7D` and reported as a broken URL. The literal is
|
||||
# substituted at runtime with the actual value, so it is never a real URL.
|
||||
# Pattern matches any `${ANY.ANY}` template literal residue.
|
||||
^https?://[^/]+/[^?#\s]*\$%7B[A-Za-z_][A-Za-z0-9_]*\.[A-Za-z_][A-Za-z0-9_]*%7D
|
||||
|
||||
# --- GitHub avatar URLs (lychee unreliably HEADs them) ---
|
||||
# `https://github.com/<user>.png(?size=N)?` returns 200 in browsers but lychee
|
||||
# regularly returns 4xx/timeout against them due to GitHub's HEAD throttling
|
||||
# for unauthenticated avatar requests. Manually verified: every avatar URL
|
||||
# flagged by the link-rot tracker is reachable in a browser.
|
||||
^https://github\.com/[A-Za-z0-9][A-Za-z0-9-]*\.png(\?size=\d+)?$
|
||||
|
||||
@@ -91,7 +91,7 @@ All diagrams are authored as **SVG files** in each chapter's `images/` directory
|
||||
To modify a diagram:
|
||||
|
||||
1. Edit the `.svg` file in any vector editor (Inkscape, Illustrator, Figma)
|
||||
2. Follow the [SVG style guide](https://github.com/harvard-edge/cs249r_book/blob/main/.claude/rules/svg-style.md) for colors and typography
|
||||
2. Follow the SVG style guide (palette, typography, canvas conventions) used by the book figures
|
||||
3. Rebuild the deck; the Makefile handles SVG-to-PDF conversion
|
||||
|
||||
### Theme Customization
|
||||
|
||||
Reference in New Issue
Block a user