fix: ignore underscore directories in link checker

Update check-doc-links.js to skip _archive, _planning, and other
underscore-prefixed directories when validating links.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
forcetrainer 2026-01-08 00:20:24 -05:00
parent 10f02daa7b
commit f535eb57b7
1 changed files with 5 additions and 1 deletions

View File

@ -196,7 +196,11 @@ function getAnchorsForFile(filePath) {
async function main() {
console.log(' → Scanning for broken links and anchors...');
const files = await glob('**/*.{md,mdx}', { cwd: DOCS_DIR, absolute: true });
const files = await glob('**/*.{md,mdx}', {
cwd: DOCS_DIR,
absolute: true,
ignore: ['**/_*/**'], // Ignore underscore directories (archive, planning, etc.)
});
const errors = [];
// Track all resolved paths for duplicate detection