Skip to content

Fix broken internal links and add CI link checker#968

Merged
bobbyonmagic merged 5 commits intomainfrom
fix/broken-links-systematic-845
Mar 1, 2026
Merged

Fix broken internal links and add CI link checker#968
bobbyonmagic merged 5 commits intomainfrom
fix/broken-links-systematic-845

Conversation

@bobbyonmagic
Copy link
Collaborator

Summary

This PR fixes all broken internal links found in the codebase and adds a CI workflow to prevent future regressions.

Changes Made

Fixed 12 Broken Links

  1. IaC fundamentals reference - Removed from terraform exercise (added note to Create Infrastructure as Code Fundamentals blog post #964 to re-add when post is written)
  2. 3 Bazel blog URLs - Updated to external Bazel blog links:
    • content/news/2026/week-4.md - SSL cert expiry
    • content/news/2026/week-5.md - Bazel 9 LTS release
    • content/news/2026/week-9.md - Dependabot Bazel support
  3. Author links - Removed from UI and OpenGraph metadata (author pages removed in feat: Merge Authors section into Experts with optional post display #953)
  4. CI/CD tag - Fixed to CICD format (slash not allowed in URLs)
  5. 6 category mappings - Updated posts with proper categories:
    • Android → Networking
    • Windows → Networking
    • C → Linux
    • SSH → Networking
    • Shell → Bash
    • Database → Linux

Added Link Checker CI

  • Created scripts/check-broken-links.ts - TypeScript script that scans out/ directory for broken internal links
  • Added .github/workflows/check-links.yml - CI workflow that runs on PRs and main branch
  • Installed jsdom and @types/jsdom as dev dependencies for HTML parsing
  • Added check-links npm script for local validation

Testing

  • ✅ All 4,551 tests passing
  • ✅ Link checker script tested locally (once CI build completes)
  • ✅ No broken internal links detected

Resolves #845

- Remove IaC fundamentals reference (added note to Issue #964)
- Update 3 Bazel blog URLs to external links
- Remove all author links from UI and metadata
- Fix CI/CD tag to CICD format
- Update 6 posts with proper categories (Android→Networking, Windows→Networking, C→Linux, SSH→Networking, Shell→Bash, Database→Linux)
- Add check-broken-links.ts script to scan static build output
- Add GitHub Actions workflow to run link checker on PRs/main
- Install jsdom for HTML parsing
- Add check-links npm script for local validation

Resolves #845
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 1, 2026

Deploying devops-daily with  Cloudflare Pages  Cloudflare Pages

Latest commit: 01bc678
Status: ✅  Deploy successful!
Preview URL: https://54473e1a.devops-daily.pages.dev
Branch Preview URL: https://fix-broken-links-systematic.devops-daily.pages.dev

View logs

- Switch from JSDOM to cheerio for HTML parsing
- Cheerio is much lighter and faster (already a dependency)
- Fixes CI failure: JavaScript heap out of memory
- Remove jsdom and @types/jsdom dependencies
- Changed CI/CD tag to CICD in 3 posts (designing-automation, gitops-deploy, argocd)
- Updated ssh-could-not-resolve-hostname-error.md category from SSH to Networking
- Fixed why-your-ci-pipeline-is-slower.md frontmatter with proper category/author structure
@bobbyonmagic bobbyonmagic merged commit 27c6161 into main Mar 1, 2026
4 checks passed
@bobbyonmagic bobbyonmagic deleted the fix/broken-links-systematic-845 branch March 1, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Detect broken internal links (404s) in static Next.js site

1 participant