feat: link checker, self-healing sync, improved 404 page#9
Open
feat: link checker, self-healing sync, improved 404 page#9
Conversation
- scripts/check-links.mjs: Node.js ESM script that scans all .mdx files in content/ and reports broken internal links (relative and absolute). Supports --section playbook|docs|all and --locale flags. Exit code 1 when broken links are found. - pr-validate.yml: add link check step after build (playbook section only, to avoid false positives from pre-existing issues in synced docs) - sync-content.yml: add four-step self-healing strategy after sync — detect broken links, attempt auto-repair via Claude Code CLI, re-check, open GitHub Issue if unresolved. Requires ANTHROPIC_API_KEY secret. - app/not-found.tsx: locale-aware 404 page that reads NEXT_LOCALE cookie and renders translated messages with navigation links to docs and playbook Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ecker Remove the npx @anthropic-ai/claude-code step from sync-content.yml. Add --fix mode to check-links.mjs: removes broken inline links and ref definitions from MDX files, keeping the link text. Zero cost, no API key needed. Runs deterministically in CI after every content sync. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove local --fix from CI. When broken links are detected after sync, open a GitHub Issue with the full list for manual resolution. Auto-repair with Claude Code is a separate local workflow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Links from synced aios-core content referenced files relative to the original repository structure (e.g. ../CHANGELOG.md, ../../COMMUNITY.md) that don't exist in the docs site. Removed link markup, kept text. 314 files fixed across pt-BR, en and es. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
scripts/check-links.mjs: Script ESM que escaneia todos os.mdxemcontent/e reporta links internos quebrados. Suporta--section playbook|docs|alle--locale. Exit code 1 quando há links quebrados.pr-validate.yml: Novo step após o build verifica links quebrados no playbook (conteúdo mantido manualmente). Links quebrados no docs/ sincronizado não bloqueiam PRs.sync-content.yml: Auto-reparo em 4 etapas após o sync — detecta links quebrados, tenta corrigir via Claude Code CLI, re-verifica, abre GitHub Issue se não resolver. Requer secretANTHROPIC_API_KEY.app/not-found.tsx: Página 404 locale-aware que lê o cookieNEXT_LOCALEe exibe mensagem traduzida com links úteis para docs e playbook (PT-BR, EN, ES).Test plan
node scripts/check-links.mjs --section playbook→✓ No broken internal links found.node scripts/check-links.mjs --section docs --locale pt-BR→ reporta links quebrados com exit code 1/qualquer-rota-inexistente→ página 404 com links de navegação no locale corretoANTHROPIC_API_KEYnas GitHub Secrets do repo para ativar o auto-reparo no sync🤖 Generated with Claude Code