Gathering detailed insights and metrics for sofilovelace-md-links
Gathering detailed insights and metrics for sofilovelace-md-links
Gathering detailed insights and metrics for sofilovelace-md-links
Gathering detailed insights and metrics for sofilovelace-md-links
En este proyecto desarrollamos con node js una librería capaz de localizar los links rotos en un archivo md o directorio.
npm install sofilovelace-md-links
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
21 Commits
1 Branches
1 Contributors
Updated on May 11, 2023
Latest Version
1.0.1
Package Id
sofilovelace-md-links@1.0.1
Unpacked Size
19.58 kB
Size
4.86 kB
File Count
7
NPM Version
9.5.0
Node Version
19.6.0
Published on
Mar 15, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
The solution to review the links contained in the markdown documentation of our projects. Find repeated links, dead links, and get statistics quickly Markdown.
npm install sofilovelace-md-links -g
git clone https://github.com/SofiLovelace/DEV003-md-links.git
You can run the module directly from powershell or your preferred terminal, you just have to go to the path where the file or directory to validate and execute is located:
md-links
.
As the first argument, you specify a relative path to a file with the md extension or a directory containing files with the md extension. The program will return an array of objects.
md-links <relative path>
In the following example we have a "README.md" file in the root of the project where the dependency is installed.
$ md-links README.md
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Markdown
Href -> https://es.wikipedia.org/wiki/Markd
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> GitHub package.json version
Href -> https://img.shields.io/github/package-json/v/SofiLovelace/DEV003-md-links?logo=GitHub
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Tests
Href -> https://img.shields.io/badge/test-ok-green
To search for documents in a directory, just pass the relative path of the directory.
The program admits 3 options: validate, stats and brokens.
When executing the program with the validate option, the dependency will perform an http query, and will return information about the status of our links.
md-links <relative path> --validate
$ md-links README.md --validate
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Markdown
Href -> https://es.wikipedia.org/wiki/Markd
Status -> 404
Ok -> fail
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> GitHub package.json version
Href -> https://img.shields.io/github/package-json/v/SofiLovelace/DEV003-md-links?logo=GitHub
Status -> 200
Ok -> ok
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Tests
Href -> https://img.shields.io/badge/test-ok-green
Status -> 200
Ok -> ok
When running the program with the stats option, the dependency will return information about our links and quick stats.
md-links <relative path> --stats
$ md-links README.md --stats
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Markdown
Href -> https://es.wikipedia.org/wiki/Markd
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> GitHub package.json version
Href -> https://img.shields.io/github/package-json/v/SofiLovelace/DEV003-md-links?logo=GitHub
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Tests
Href -> https://img.shields.io/badge/test-ok-green
******STATS*******
-> Total: 3
-> Unique: 3
We can combine the options validate and stats
md-links <relative path> --validate --stats
$ md-links README.md --validate --stats
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Markdown
Href -> https://es.wikipedia.org/wiki/Markd
Status -> 404
Ok -> fail
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> GitHub package.json version
Href -> https://img.shields.io/github/package-json/v/SofiLovelace/DEV003-md-links?logo=GitHub
Status -> 200
Ok -> ok
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Tests
Href -> https://img.shields.io/badge/test-ok-green
Status -> 200
Ok -> ok
******STATS*******
-> Total: 3
-> Unique: 3
-> Broken: 1
We can add the brokens option, and we will be able to easily find out about our broken links
md-links <relative path> --validate --stats --brokens
$ md-links README.md --validate --stats --brokens
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Markdown
Href -> https://es.wikipedia.org/wiki/Markd
Status -> 404
Ok -> fail
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> GitHub package.json version
Href -> https://img.shields.io/github/package-json/v/SofiLovelace/DEV003-md-links?logo=GitHub
Status -> 200
Ok -> ok
=================================================================================================================================
File -> C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
Text -> Tests
Href -> https://img.shields.io/badge/test-ok-green
Status -> 200
Ok -> ok
*******STATS*******
-> Total: 3
-> Unique: 3
-> Broken: 1
******BROKENS******
==========================================================================================================================
> file: C:\Users\Winney\Documents\desarrollo-web\proyectos laboratoria\Bootcamp\DEV003-md-links\DEV003-md-links\README.md
> href: https://es.wikipedia.org/wiki/Markd
No vulnerabilities found.
No security vulnerabilities found.