Repair verified broken links and tighten link-checker accuracy (#845)

Merged
LU
4d ago
+1242-314

The weekly link-checker report (#845) had accumulated 89 actionable errors, 2 unregistered DOIs, 1 direct publisher URL, and 2 stale bot-blocked links—a mix of genuinely rotted links on hand-maintained pages, trailing-punctuation bugs in rendered cluster references, leaked Word hyperlink field switches in /disciplines/, and noisy false positives from bot-blocking and report-parsing bugs.

This PR repairs every verified broken link in hand-maintained pages, fixes the root template/parser causes without touching generated files, tightens the link-checker configuration and workflow, and lists the remaining dead upstream Google Sheet links for source maintenance.

Refs #845 — partial (#845 is the recurring weekly report; upstream Google Sheet cells and main-only content remain outside this PR). Note that the direct publisher URL in content/reversals/reversals.md:1989 (psycnet.apa.org/fulltext/2019-68134-001.pdf) and the dead mheducation.com.au / Rohrer_et_al_2015JEPG.pdf links were already repaired on rebrand-doors in #1054.

Hand-maintained page repairs (15 links across 10 files)

Every replacement DOI was verified against the DOI Handle API and Crossref/DataCite; every OSF and Wayback snapshot was checked to return 200 with the exact intended article/PDF (not parked or WAF-stub pages).

PageOriginal URLReplacementVerification
content/awards/awards.mdjisc.ac.uk/news/all/jisc-announces-2023-community-championsWayback 2025-09-22Live URL returns 404/challenge; snapshot lists Dr Flavio Azevedo (2023 Jisc Community Champions)
content/awards/awards.mdosc-galway.ie/competition/Wayback 2022-11-27Domain parked since 2023; last genuine Open Scholarship Prize capture
content/adopting/adopting.mdjournalofcognition.org/articles/10.5334/joc.72https://doi.org/10.5334/joc.72Canonical DOI (Brysbaert, 2019 power tutorial)
content/adopting/adopting.mdzenodo.org/record/3593258#.X3J4W2hKgUEhttps://doi.org/10.5281/zenodo.3593258Canonical DataCite DOI (Wiegers & van Gelder, 2019)
content/educators-corner/010-Neurodiversity/index.mdadhdfoundation.org.uk/.../Takeda_Will-the-doctor-see-me-now_ADHD-Report.pdfWayback 2026-09-19Domain NXDOMAIN; snapshot verified as valid PDF
content/educators-corner/018-accessible-feedback-in-research/index.mdeige.europa.eu/.../garcia_working_paper_5_academic_careers_gender_inequality.pdfWayback 2026-10-15Origin serves geolocation block with self-signed TLS cert to non-EU hosts; snapshot verified as valid PDF (note: may be temporary on EIGE)
content/lesson-plans/nd-lessons-plans.md & content/neurodiversity-lessonbank/_index.mdapa.org/science/about/psa/2019/02/open-scienceWayback 2021-06-03404 on APA since July 2026; verified non-Incapsula capture (An introduction to open science)
content/pedagogies/003-CREP/index.mdapa.org/ed/precollege/about/undergraduate-majorWayback 2022-01-20404 on APA since Aug 2026; verified non-Incapsula capture (APA Guidelines for the Undergraduate Psychology Major)
content/pedagogies/001-Julia-Strand/index.mdpsych.unl.edu/mdodd/Psy498/BarghPrime.pdfhttps://doi.org/10.1037/0022-3514.71.2.230Canonical DOI (Bargh, Chen, & Burrows, 1996)
content/OS-developing-world/OS-developing-world.md (3 links)http://osf.io/7ubk2https://osf.io/7ubk2Port 80 timed out; HTTPS returns 200
content/replication-hub/large-scale-replication-projects/index.mdhttp://www.socialsciencesreplicationproject.comhttps://osf.io/pfdyw/Domain NXDOMAIN; official SSRP OSF repository (Camerer et al., 2018)
content/replication-hub/large-scale-replication-projects/index.mdhttps://reprosci.epfl.chhttps://doi.org/10.7554/eLife.108403Live app returning 500; canonical eLife Reviewed Preprint DOI (Lemaitre et al.)
content/reversals/reversals.mdpsych.colorado.edu/~jclab/pdfs/Correll%20(2008).pdfhttps://doi.org/10.1037/0022-3514.94.1.48Canonical DOI (Correll, 2008)
content/reversals/reversals.mdrips-irsp.com/article/10.5334/irsp.571/https://doi.org/10.5334/irsp.571Canonical DOI (Adelina & Feldman, 2021)
content/reversals/reversals.mdpublikationen.uni-tuebingen.de/xmlui/handle/10900/91253https://doi.org/10.15496/publikation-32634Canonical DataCite DOI (Ilchovska & Culbertson, 2019; repository host currently timing out)

Template & generator fixes (zero generated files edited)

  • Cluster fallback links (layouts/partials/clusters/cluster_section.html): exclude trailing sentence punctuation ([.,;:!?)\]]) when auto-linking non-DOI URLs, matching summary_entries.html and games/text.html. Fixes research-undergraduate. (404 in #845) plus three other cluster URLs (psyarxiv.com/tcxaj/., muse.jhu.edu/article/513250., leidenmadtrics.nl/...journal?). Added hard regression check #29 in scripts/check_seo_html.py.
  • Disciplines parser & repair map (scripts/disciplines_link_repairs.json, scripts/parse_disciplines_gdoc.py, scripts/parse_disciplines_to_json.py):
    • Strip leaked Microsoft Word HYPERLINK field switches (%22%20/o%20...%22%20/t%20%22_blank) in both parsers, fixing the malformed 10.1038/nrn.2016.167 DOI.
    • Added 11 verified /disciplines/ link repairs (royalsoced.org.uk → rse.org.uk, degruyter.com/.../opar → degruyterbrill.com/journal/key/opar/html, clarin.dk/clarindk/forside.jsp → info.clarin.dk, http://eprints.rclis.org/ → https://eprints.rclis.org/, openarchaeologydata.metajnl.com/.../joad.57/ → doi.org/10.5334/joad.57, and verified Wayback captures for retired/offline blog.f1000.com, mhdss.ac.uk ×2, opted.eu D7.6 PDF, openbioresources.metajnl.com, pubpsych.zpid.de).
    • Wired parse_disciplines_to_json.py to apply disciplines_link_repairs.json and Word field-switch cleanup during export (takes effect next time parse_disciplines_to_json.py is re-run and data/disciplines.json is committed).
  • Curated resources generator (content/resources/resource.py): strip leading/trailing whitespace from link_to_resource during wrangle_data() (4 rows in the sheet currently have leading spaces/newlines; takes effect on the next data-processing run).

Link-checker accuracy (.lychee.toml, .github/workflows/link-check.yaml)

(Takes effect for weekly runs once merged to the default branch.)

  • Exclude facebook.com (returns 400 to all automated requests) alongside linkedin.com/twitter.com/x.com, and anchor both facebook.com and x.com to host boundaries (://(?:[^/]*\.)?x\.com(?:/|$)) so unanchored x.com no longer silently skips dropbox.com, mapbox.com, vox.com, slatestarcodex.com, replicationindex.com, and hugoblox.com.
  • Exclude ^https://eocampaign1\.com/form/ (the POST-only newsletter signup action that legitimately returns 405 to HEAD/GET probes; /web-version links remain checked).
  • Extend the workflow's second-pass browser GET + Wayback verification from 403 to 403, 405, 409, and 412 (recovers De Gruyter, NIHR, Dimensions, Econ Journal Watch; sends oer.deepwebaccess.com to Wayback verification). 401 remains in Broken links so genuinely restricted public forms (e.g. Google Forms requiring sign-in) are never misreported as working.
  • Fix the timeout page-attribution bug (### Timeouts in ... headers were ignored, attributing all 22 timeouts to /welcome/) and guard bullet parsing to ## Errors / ## Timeouts sections so future lychee releases' ## Ignored per input sections are not parsed as broken links.
  • Align the DOI validator with .lychee.toml's exclude_path by skipping archived newsletter issues (^/newsletters/\d{4}-\d{2}/), resolving the historical /newsletters/2025-10/ (10.31234/osf.io/znbep) false alarm.

Remaining upstream Google Sheet links (for source maintainers)

Generated files under content/curated_resources/, content/glossary/, and data/disciplines.json were not hand-edited. The following genuinely dead or misconfigured upstream sheet entries remain to be updated at source:

  • Curated Resources sheet (gid=1924034107):
    • https://www.dpjedi.org/ and https://www.dpjedi.org/resources → drop www. (https://dpjedi.org/, https://dpjedi.org/resources return 200)
    • https://www.preclinicaltrials.eu/ → drop www. (https://preclinicaltrials.eu/ returns 200)
    • https://www.energielabzuidoost.nl/just-prepare/ → 404 (project page removed on energielabzuidoost.nl)
    • https://www.phil.vt.edu/dmayo/personal_website/Schmidt_Hunter_Eight_Common_But_False_Objections.pdf → SSL mismatch / dead host (replace with Wayback or DOI 10.1037/1082-989X.1.2.115)
    • https://stemdust.com/posts/deletion-erasure-and-what-the-marker-test-can-actually-prove → connection timeout
  • Glossary sheets / Doc:
    • http://www.replicationmarkets.com/ → https://replicationmarkets.org/ (200 OK)
    • https://www.equator-network.org/about-us/what-is-a-reporting-guideline/ → 404 (site restructured)
    • http://legacy.earlham.edu/~peters/fos/overview.htm → connection timeout (replace with Wayback capture)
    • https://www.go-fair.org/fair-principles/ → redirects to https://www.gofair.foundation/fair-principles
  • Disciplines sheet (1mSlduu86_nE1sY1gXobw3Pp1vI73B_0iHBsJqjtsJU4):
    • Re-run python3 scripts/parse_disciplines_to_json.py (or update the 12 cells matching scripts/disciplines_link_repairs.json + strip the Word field switch on 10.1038/nrn.2016.167) to propagate the repairs into data/disciplines.json.

Verification

  • hugo --gc --minify --cleanDestinationDir built cleanly (3,516 pages).
  • python3 scripts/rebrand/check_source_rules.py --base origin/rebrand-doors: passed (0 template/menu violations, 0 generated paths changed).
  • python3 scripts/check_seo_html.py <dir>: all 29 hard checks passed, including new check #29.
  • Unit tests passed: test_parse_disciplines_gdoc.py (13/13), test_check_seo_html.py (52/52), test_resource_entities.py (6/6), test_rebrand_checks.py (61/61).
  • Verified all rendered href values in built HTML and captured verification screenshots of key repaired pages:

awards-desktop-1
replication-hub-large-scale-replication-projects-desktop-1
clusters-cluster-1-desktop-1

Created with Gemini 4 Neon in Antigravity (pre-PR audit by Claude Opus 5.5).


Summary by cubic

Repairs the verified broken links from the weekly link-checker report (#845) in hand-maintained pages, swapping dead URLs for canonical DOIs and verified Wayback captures, and fixes the parser and template bugs behind them. Also tightens the link-checker workflow to cut false positives and replaces the image-only PR check with an advisory content-rules check. Remaining dead upstream Google Sheet links are documented for source maintainers.

Link-checker workflow

  • Bot-blocked and method-restricted responses (403/405/409/412) get a second-pass browser GET and Wayback verification; 401 stays in Broken links so auth-gated forms are never reported as recovered.
  • Zenodo URLs are verified against the Zenodo REST API via a new helper module, promoting dead records and files to Broken links.
  • Excludes facebook.com, anchors the x.com exclusion, and excludes Slack invite/workspace domains and the POST-only newsletter form endpoint.
  • Fixes the timeout page-attribution bug and restricts bullet parsing to Errors/Timeouts sections.
  • Aligns the DOI validator with .lychee.toml's exclude_path for archived newsletter pages.

Root-cause fixes

  • Cluster fallback links no longer swallow trailing sentence punctuation or unmatched closers, with a new hard regression check.
  • Disciplines parsers share one repair helper that strips leaked Word HYPERLINK field switches and applies verified link repairs on export.
  • The curated resources generator strips whitespace from link_to_resource values.
  • Replaces the image-only PR check with check_content_rules.py, which advisories on newly added publisher URLs with embedded DOIs in hand-maintained content alongside the existing WebP warning.

Refs #845 — partial (the recurring weekly report; upstream Google Sheet cells and main-only content remain outside this PR).