Fix lychee broken-link report (#1884)#1885
Merged
Merged
Conversation
Every post emits the spec-required <link rel="site.standard.document" href="at://did:plc:…"> tag (plus the homepage publication tag). lychee 0.24.2 can't parse the at:// scheme — the colons in did:plc:… read as an invalid port — so it throws a hard parse error that no --exclude, --scheme, --remap, or .lycheeignore rule can suppress (they all run after URL parsing). This produced 125+ false-positive errors per scheduled run, drowning real link rot. Strip these verification-infrastructure link tags from the throwaway link-check build (after lint-html, before lychee). Production output is unaffected: links.yml builds its own dist-astro and never deploys it. Remove the now-confirmed-dead ^at:// .lycheeignore rule. Refs #1884 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Addresses #1884 (lychee "Broken links detected" report — 587 errors).
The report splits into three buckets. This PR lands the systematic fix first; the link-rot swaps follow as additional commits.
1. Systematic
at://false positives (125+ errors — the bulk) ✅Every post emits the spec-required
<link rel="site.standard.document" href="at://did:plc:…">standard.site verification tag (plus the homepage publication tag). lychee 0.24.2 (the action's pinned default) can't parse theat://scheme — the colons indid:plc:…read as an invalid port — so it throws a hard parse error before any--exclude,--scheme,--remap, or.lycheeignorerule applies (all of those run post-parse). The old^at://ignore line was therefore dead code. This produced 125+ false positives per scheduled run, drowning real link rot.Fix: strip these verification-infrastructure link tags from the throwaway link-check build (after
lint-html, before lychee). Production output is unaffected —links.ymlbuilds its owndist-astroand never deploys it. Removed the dead^at://rule. Verified site-wide: 0at://errors remain.2. & 3. Dead microsites + external link rot (archive.org swaps) — follow-up commits
Per maintainer direction: replace genuinely-dead links with contemporaneous web.archive.org snapshots (CDX era-closest, not recent parked captures), unlink where no snapshot exists, and leave live links alone (verified — many
ERROR-status links like bit.ly/Business Insider just block lychee's bot and return 200).Separate finding (not in this PR): archived posts 404
src/pages/[year]/[month]/[day]/[slug].astrogetStaticPathsusesisPublishedPost, which excludesarchivedposts — so all 28 archived posts 404, even thoughPostLayoutrenders anArchivedPostWarningbanner and plumbs thearchivedprop for them (currently dead code). ~10 archived posts have inbound links from other content. Recommend a one-predicate fix to build archived posts (with the warning) while keeping them out of listings/feed/sitemap. Flagged for a separate decision.🤖 Generated with Claude Code