Skip to content

thatmare/md-links

 
 

Repository files navigation

md-links-thatmare

Table of Contents


1. Description

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

2. Install

If you already have Node, just run npm install md-links-thatmare.

3. Usage

3.1 Command-line interface

  • md-links --help To print the usage instructions:

image

  • md-links <path> You can analyze files or directories with a relative or absolute path.

image

  • md-links <path> --validate Gives you the HTTP status and message.

image

  • md-links <path> --stats Counts the total and unique links.

image

  • md-links <path> --stats --validate Counts the total, unique and broken links.

image

3.2 Library

  1. Require the module md-links-thatmare.

image

  1. You'll have acces to two functions: mdLinks and linksToAnalyze. 2.1 mdLinks(<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.

image

image

2.2 linksToAnalyze(<path>) Returns an array of objects with title, link and path keys.

image

About

md-links-thatmare is a library and a command-line interface to analyze the links in Markdown files.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%