hyperlink

A command-line tool to find broken links in your static site.

Installation and Usage

Download the latest binary and:

```bash

Check a folder of HTML

./hyperlink public/

Also validate anchors

./hyperlink public/ --check-anchors

src/ is a folder of Markdown. Show original Markdown file paths in errors

./hyperlink public/ --sources src/ ```

Or as GitHub action:

yaml - uses: untitaker/hyperlink@0.1.24 with: args: public/ --sources src/

Or build from source using Cargo (needs Rust installed):

bash cargo install hyperlink # latest stable release cargo install --git https://github.com/untitaker/hyperlink # latest git SHA

Or install via npm:

bash npm install -g @untitaker/hyperlink

Options

When invoked without options, hyperlink only checks for 404s of internal links. However, it can do more.

Exit codes

Alternatives

(roughly ranked by performance, determined by some unserious benchmark. this section contains partially dated measurements and is not continuously updated with regards to either performance or featureset)

None of the listed alternatives have an equivalent to hyperlink's --sources and --github-actions feature.

Testimonials

We use Hyperlink to check for dead links on Graphviz's static-site user documentation, because:

In conclusion, Hyperlink fills the "static site continuous testing" niche really nicely.

-- Mark Hansen, Graphviz documentation maintainer

License

Licensed under the MIT, see ./LICENSE.