Introduction
A tool for validating links in Markdown files
Setup
Install it.
Scan available URLs, it predicts them from your file-system based routing.
Validate Markdown files and print errors.
The validateFiles
function accepts a list of file paths or file objects containing its path and content.
You can run this script during lint process, or before builds.
tsx
.Configurations
Meta
Specify allowed queries and fragments of a page.
Static Params
Use populate
to populate dynamic routes into static.
Each param object indicates a page, allowed hashes and queries can be specified individually.
Multiple Params
When you have multiple dynamic routes, you need to use an object instead.
External Urls
To validate external urls, enable it.
Relative Urls
To support relative urls, you need to specify a function that generates url based on file path.
Utilities
readFiles
Read files for given glob patterns, and output a list of file objects.
You can use it in conjunction with validateFiles
.