-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I've recently started using hyperlink to validate my static sites internal links π - it works really well. But I've got some requests from real world usages that I'm going to file issues for.
Current Behavior
The output for hyperlink is not machine parseable, so its hard to wire up checks that may accept some known errors or inconsistencies. For example, I currently have a site that reports the following error output:
./dist/client/404.html
error: bad link /404
./dist/client/_redirects
error: bad link /roster/@slug/matches/1
Both of these resolve to known good files. To continue using the package, I am wrapping the command in a script that checks if these are the only 2 failures and exits with code 0, else prints the output and exits with code 1.
Expected Behaviour
When passed --json the tool reports a JSON structure over stdout that is easier to handle with jq or similar processing pipelines.