Validates markdown files for broken links of all types.
Searches through markdown files to find broken internal links, external HTTP/HTTPS links, missing images, invalid anchors, and other link integrity issues.
File patterns to validate (supports globs)
Validation configuration options
Promise resolving to validation results
Basic validation
const result = await validateLinks(['**/*.md'], {checkExternal: true,onlyBroken: true});console.log('Found ' + result.brokenLinks + ' broken links in ' + result.filesProcessed + ' files'); Copy
const result = await validateLinks(['**/*.md'], {checkExternal: true,onlyBroken: true});console.log('Found ' + result.brokenLinks + ' broken links in ' + result.filesProcessed + ' files');
Validate specific link types only
const result = await validateLinks(['docs/*.md'], {linkTypes: ['internal', 'image'],strictInternal: true,includeContext: true}); Copy
const result = await validateLinks(['docs/*.md'], {linkTypes: ['internal', 'image'],strictInternal: true,includeContext: true});
Validates markdown files for broken links of all types.
Searches through markdown files to find broken internal links, external HTTP/HTTPS links, missing images, invalid anchors, and other link integrity issues.