Sanmdlinks
is a library that allows you to know the status of the links contained within your markdown (.md) files. You can enter the path for files and directories.
Also, it allows you to know some statistics that could help you, such as knowing the total number of links, how many are broken and the unique links.
Enter the following commands to install it.
npm install @sharonavarro/md-links
sanmdlinks <path> [option]
You have two options at your disposal and more than one way to use it! Here you will see the following cases
- If you just enter the command
sanmdlinks
it will show you an introductory message
- If you add the path, either file or directory, it will give you information such as the link, the text that represents it in the Markdown file and its absolute path.
- Whether the request returns an optimal status code and no errors from either the client or the server, it will let you know that it is "ok", otherwise it will return "Fail".
- Total links in a file as well as the number of unique links contained in it.
- Apart from the other two statistics seen above, there is a plus, which is knowing how many links are broken.
This flowchart can help you understand how the library works and what principles the responses follow.
This project was implemented with...
- Javascript.
- Node.js.
- Npm.
- Jest.
- ESlint.
Its dependencies were...
- node-fetch.
- marked.
- jsdom.
- figlet.
- chalk.
Thank you!