Linkguard: catch dead links and swap in archived copies
Описание и применение
Linkguard автоматически обнаруживает недействительные внешние ссылки в статических блогах, предлагает архивные копии и может создать пулл-реквест для их замены.
Задача
Blog posts accumulate dead outbound links over time, breaking reader experience.
Результат
Linkguard automatically detects dead outbound links, provides archived alternatives, and can generate a pull request to update the content, improving site reliability without manual effort.
Рабочий процесс
- Add Linkguard GitHub Action to workflow
- Action scans markdown/HTML for outbound links
- Each link is classified as ok, moved, dead, or blocked
- For dead links, Wayback Machine snapshot is queried
- Results are reported in job summary, annotations, JSON, and markdown
- If open-pr:true, PR is opened replacing dead links with archived URLs
Доказательства
Drop it into a weekly workflow and Linkguard walks your content, pulls every outbound link out of the markdown and HTML (skipping code blocks, comments, relative links, and private addresses), and checks each one.
For each link it also asks the Internet Archive’s Wayback Machine for a snapshot. When a dead link has a good one, the report hands you the archived URL.
Set open-pr: true and Linkguard opens a pull request that replaces each dead link with its web.archive.org copy, exactly where it appears and nowhere else.
- Дата записи: 2026-10-19T12:41:15.708Z