- 1. About ExtLink markdown library
- 2. Installing
- 3. Usage
- 4. Importing
- 5. Version
- 6. Licence
- 7. Action Plan
ExtLink is a free, open source JavaScript library that allows you to read, parse, and validate links to files in Markdown
(.md) formats, using HTTP requests (http.get) in node.js.
In addition, this library allows access to the statistics of these links.
You can use this module installing it in your package json as follows in your terminal:
$ npm install --save-dev https://github.com/meryvera/LIM014-mdlinks
You can use this module under the following structure:
mdLinks 'path-to-file' --options
IMPORTANT. In the interface,
'path-to-file'
is the path of your Markdown file or folder with markdown files and other files, and where:It can take the following values:
Just with a path and without any option, the module will return a list of all links found in all markdown files. This list shows the entered path to be analyzed, the links found in each markdown file and the text of each link. Example:
With this option, the module makes an HTTP request to find out if the link works or not. If the link results in a redirect to a URL that responds ok, then we will treat the link as ok. Example:
With this option, the output will be a text with basic statistics about the links. Example:
With the combination of both values you will obtain the statistics that you need from the validation results. Example:
With --help option, you can access to the information above in your terminal .
mdLinks(path, options)
You can import the module in your scripts:
import mdLinks from 'md-links-mv';
const mdLinks = require('md-links-mv');
You can also use the module´s api in your proyect, using the interface above, where 'path' is your file path and 'options' can take true value if you want to use the api with http states of each link found in markdown files, and false value or null value if you just want to get a list with the details .
1.0.1
Licencia MIT ©️ 2021