Internal links reports — tmp/README.md
Internal links reports — tmp/README.md
This folder contains autogenerated reports and a small set of safe, automated changes for helping you find and fix broken internal links in the built _site output.
Files
-
internal_links_auto_changes.csv— CSV of automated source edits applied by_scripts/fix_internal_links.rb(format:source_file,original_href,replacement). Backups were written as<file>.bakbefore any change; review backups before committing. -
internal_links_report.csv— Raw broken-link rows found by the linter (format:site_file,href,expected_target). Use this to find and edit the source pages. -
internal_links_summary.csv— Aggregated, prioritized list of missing hrefs (format:href,count,sample_site_files,expected_targets). Highercountmeans higher priority for fixing. -
internal_links_summary.txt— Human-friendly top summary of missing hrefs (first ~50 lines) for quick triage.
Scripts
-
_scripts/fix_internal_links.rb— Safe auto-fix script that replaceshref="foo.html"→href="foo/"when_site/foo/index.htmlexists. It writes.bakbackups before modifying source files and writestmp/internal_links_auto_changes.csv. -
_scripts/summarize_internal_links.rb— Summarizes the raw report intotmp/internal_links_summary.csvandtmp/internal_links_summary.txt.
How to use
-
Inspect
tmp/internal_links_summary.csvto find the highest-impact missing hrefs. Review sample pages listed in that CSV. - For each missing href, decide whether to:
- Update the source page to point to an existing
_sitepage (recommended), or - Add the missing asset/page, or
- Remove the stale/legacy link if the content is intentionally gone.
- Update the source page to point to an existing
- After making source edits, run:
bundle exec jekyll build
bundle exec rspec spec/pages/internal_links_spec.rb
- Repeat until the spec passes.
Notes & Safety
- We excluded
_legacypages/from automated edits by request — legacy files are left unchanged. - The auto-fix script only converts
.html→/when a correspondingfoo/index.htmlexists in_site. - Always inspect
.bakfiles before committing changes.
Want help?
If you want, I can:
- Produce a prioritized checklist (Markdown) with suggested edits for each high-impact href.
- Open a draft branch/PR that includes the safe automated changes and the
tmp/reports for review (no content commits without your approval). - Start making small, human-reviewed content fixes on a branch for your review.
Tell me which you prefer and I’ll proceed.