Skip to content

Geyiro/DEV008-md-links

 
 

Repository files navigation

Markdown Links

1. Prologue

Markdown is a lightweight markup language that is very popular among developers. It is used on many platforms that handle plain text (GitHub, forums, blogs, etc.) and it is very common to find several files in this format in any type of repository (starting with the traditional README.md).

These Markdown files typically contain links that are often broken or no longer valid, greatly diminishing the value of the information being shared.

Within an open-source community, we have proposed to create a tool using Node.js, which reads and analyzes files in Markdown format to check the links they contain and report some statistics.

2. MdLinks Script

Mdlinks is a library developed using Node.js that allows you to read and analyze the links within a Markdown file and returns general information about them, thus reducing the time it would take to verify them manually.

3. Flow Chart

CLI flow chart:

./Assets/Diagrama de Flujo MD-LINKS (1).png

API (mdlinks) flow chart:

./Assets/Diagrama de Flujo MD-LINKS (1).png

4. How to use

After downloading the package, you will need to enter index.js followed by the path of the file desired to be analysed and the option(s).

screenshot of welcome message

With index.js ./markdown/file/path --validate you will get the text, type(internal or external), location(URL), valid(can be true or false) and the HTTP response for each link within the file.

screenshot of --validate

With index.js ./markdown/file/path --stats you will get the total number of links and the total number of unique links.

screenshot of --stats

Also you can input index.js ./markdown/file/path --stats --validate (or viceversa) to get the total number of links, the total number of unique links and the total number of broken links.

screenshot of --stats & --validate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%