Skip to content

LukasDzenk/markdownUrlChecker

Repository files navigation

Introduction

This Node JS script parses .md files within "input" directory and prints out an array of broken URLs that were found.

Prerequisites

Installation

npm install

Production mode

To log incorrect errors to the console:

npm run check

To log incorrect errors to the console and create .json files with errors in the 'output' directory.

npm run checkAndExport

General concept

The URL checker works by:

  1. Finding internal markdown links via regex (e.g. [Some title](#Title--sub-title--sub-sub-title))
  2. Then, parsing the whole .md document and recursively building a headerObject, which is then used to create an array of all possible valid internal links.
  3. Comparing the two arrays. If there's an item in the array from point 3. that is not found within point 2., then an alert is raised.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published