Skip to content
Ferrolink

Catch broken links before they go live.

A link checker for finished static sites. Ferrolink checks page links, assets and anchors against the files your build actually produced. Run it from the command line, Node.js or Vite, without starting a server or making network requests.

The page exists. Does the anchor?

A link can reach a real page and still leave the reader in the wrong place. Ferrolink checks the target element too, alongside image sources, responsive images, scripts and other local assets.

See exactly what is checked
Version
0.2.1

Check the paths your host will serve.

Project paths, directory indexes and extensionless URLs matter after deployment. Set your public URL and Ferrolink can catch links that forget the base path, plus missing destinations in supported deployment files.

Add the check after your build

Three small mistakes. One failed check.

A missing anchor, a missing image and a link outside the project path. Compare the same small build before and after fixing its references.

References in the buildindex.html
<a href="/docs/guide/setup#installation">Install</a>
<img src="/docs/assets/preview.svg" alt="Preview">
<a href="/guide/setup">Guide</a>
Native Rust result · 3 issues
index.html:3 · missing anchor
  /docs/guide/setup#installation

index.html:4 · broken link
  /docs/assets/preview.svg

index.html:5 · outside base
  /guide/setup

3 issues · exit 1
2 pages · 3 internal references
1 external URL not checked

The check uses --site-url https://example.org/docs/. The guide contains an id="install" anchor and the build includes assets/logo.svg. One external URL is counted, without a request.

Both results are generated by the real Rust CLI and checked again in CI. Durations are omitted from this small example.

One finished directory. A check you can repeat.

Source files cannot tell you everything about the site your generator will publish. Check the artifact itself, locally or in CI.

No server to bring up

Read the build on disk. Internal references are resolved locally; external URLs are counted, without being fetched.

Old versions, explicit rules

Skip checking links inside archived pages, or accept targets that are deployed separately. Those are distinct choices.

Deployment files count too

Check version paths in Ardo’s versions.json and local redirect or rewrite destinations in _redirects and vercel.json.

A useful result for CI

Get source files, line numbers and issue kinds. Use a failing exit code, JSON output or the JavaScript report to act on them.

Built for generated HTML. Measured on real pages.

Ferrolink walks the build with Ferralk and scans pages in parallel with Ferroni. The scanner collects the references and anchors it needs, without constructing a DOM. A documented comparison with three HTML tokenizers explains that choice.

This is a build check, not a full HTML validator or a live-site crawler. The parser decision records how malformed markup and named character references can differ from a browser. External availability and JavaScript-generated links remain outside the check.

Make it part of your Vite build.

Install the npm package with its prebuilt native binary. The plugin checks the finished client output and fails the build when it finds issues.

Install for Node.js
npm install --save-dev ferrolink
Add the Vite plugin

Need the JavaScript API instead?

Use it with any static build.

Install the Rust command-line tool and point it at your output directory. Run it yourself or add it as the next step in CI.

Install and check
cargo install --locked ferrolink
ferrolink check dist
Start with the CLI