npm install @marifervl/md-links
md-links <path> [options]
Where <path>
is the absolute or relative path to the file or directory to analyze, and [options]
are additional options that can be used to customize the output.
--validate
If this option is included, the package will make an HTTP request to verify if each link works correctly. If the link redirects to a URL that responds "ok", then it will be considered as a valid link. The output will include the status of the HTTP response received.
--stats
If this option is included, the output will include basic statistics about the links found in the file. The total number of links found and the number of unique links will be displayed.
--validate --stats
If both options are included, the output will include statistics about the links found, including how many links are broken (i.e., do not respond "ok" when making an HTTP request).
md-links file.md
Prints to the console the links found in the file file.md
, along with the file path where each link was found and the text that appears within the link.
md-links directory/
Analyzes all Markdown files within the directory directory/
and its subdirectories, and prints to the console the links found.
md-links file.md --validate
Prints to the console the links found in the file file.md
, along with the file path where each link was found, the text that appears within the link, and the status of the HTTP response received when making an HTTP request.
md-links file.md --stats
Prints to the console basic statistics about the links found in the file file.md
, including the total number of links found and the number of unique links.
md-links file.md --validate --stats
Prints to the console statistics about the links found in the file file.md
, including the total number of links found, the number of unique links, and the number of broken links.
MariferVL-MDLinks.mp4
- Fork the repository.
- Create a new branch for your changes (git checkout -b my-branch).
- Make your changes and commit them ( git commit -am "Add new functionality" ).
- Push the changes to your fork ( git push origin my-branch ).
- Create a pull request from your fork to the main branch of the original repository.
- Wait for your pull request to be reviewed and accepted.