vuepress check-md
- Check dead links of markdown.
This plugin is powered by check-md made with ❤️ by @whxaxes.
This plugin help check following types of dead links
- Empty link.
- Non-existed target markdown file.
- Non-slugified hash.
- Non-existed hash.
- Prefer
.md
to.html
(warn
)
yarn add -D vuepress-plugin-check-md2
# OR npm install -D vuepress-plugin-check-md
module.exports = {
plugins: ['check-md2']
}
vuepress check-md2 [docsDir]
module.exports = {
plugins: ['check-md2', {
pattern: '**/*.md'
}]
}
Following options can also be passed via CLI options, e.g. vuepress check-md2 --fix
- Type:
boolean
- Default:
false
Check and try to fix
- Type:
GlobPattern
- Default:
**/*.md
Glob pattern of resolved markdowns.
- Type:
GlobPattern
- Default:
**/node_modules
Glob pattern to specify paths from being checked.
- Type:
'none' | 'info' | 'warn' | 'error'
- Default:
'error'
Process exit level, default to error
, other choice is warn and none, it will not exit if setting to none.
- TYpe:
Function
- Default:
() => true
Filter function to filter out some links.