md-links-thatmare
is a library and a command-line interface to analyze the links in Mardown files. This project was developed with Node.js filesystem and Axios.
With this package you're able to:
- Identify links.
- Validate links HTTP status.
- Get statistics about the links.
Check the npm package published here
If you already have Node, just run npm install md-links-thatmare
.
md-links --help
To print the usage instructions:
md-links <path>
You can analyze files or directories with a relative or absolute path.
md-links <path> --validate
Gives you the HTTP status and message.
md-links <path> --stats
Counts the total and unique links.
md-links <path> --stats --validate
Counts the total, unique and broken links.
- Require the module
md-links-thatmare
.
- You'll have acces to two functions:
mdLinks
andlinksToAnalyze
. 2.1mdLinks(<path>, { validate: boolean } )
- If
false
, returns an array of objects with title, link and path keys. - If
true
, returns an array of objects with title, link, path, status and message keys.
2.2 linksToAnalyze(<path>)
Returns an array of objects with title, link and path keys.