Skip to content

alobzov/asciidoc-link-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asciidoc Link Checker

test Hits-of-Code My Telegram

This module extracts links from asciidoc texts and checks whether each link is alive ( 200 OK ) or dead.

Installation through Yarn

To install the module simply run

yarn add asciidoc-link-checker@0.1.0

Valid Links Example

Run

yarn asciidoc-link-checker ./test/data/valid-links-file.adoc

The exit code would be 0 and every link found is alive ( 200 OK ).

7:27   200 OK   http://docs.asciidoctor.org/asciidoc/latest/document-structure
7:96   200 OK   https://docs.asciidoctor.org/asciidoc/latest/document-structure
11:1   200 OK   http://docs.asciidoctor.org/asciidoc/latest/key-concepts
13:22   200 OK   https://docs.asciidoctor.org/asciidoc/latest/key-concepts
19:30   200 OK   http://docs.asciidoctor.org/asciidoc/latest/document-processing
19:124   200 OK   https://docs.asciidoctor.org/asciidoc/latest/document-processing
Exit code: 0

Invalid Links Example

Run

yarn asciidoc-link-checker ./test/data/invalid-links-file.adoc

The exit code would be -1 and every link found is not alive.

7:30   FAILED   http://docs.asciidocor.org/asciidoc/latest/document-structure
7:97   FAILED   https://docs.asciidocor.org/asciidoc/latest/document-structure
Exit code: -1

Input File Validation

If the input file is undefined, the exit code would be -2.

If the input file is not adoc, the exit code would be -3.

If the input file is empty, the exit code would be -4.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published