static-link-sentinel
check links in static HTML
Find broken internal links and flag external links in a crawled static mirror.
- 104/week on npm
- 2★
- MIT
- v1.1.2
- In use on this site
- Developer Tooling
npx static-link-sentinelRead the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)
static-link-sentinel
From the README
Run it on your built static site (dist/, build/, out/, public/, site/) before you deploy. It finds broken internal links, missing assets, missing #anchors and paths whose letter case only works on macOS, then fails CI. With --external it also checks outbound links for 404s and redirect chains, showing every hop. You don't need a server: it maps URLs to files the way Netlify, Vercel, GitHub Pages and Cloudflare Pages do (clean URLs, index.html, trailingSlash, basePath, redirects, vercel.json). Each problem comes with a fix line, such as did you mean /blog/post-1/? Zero dependencies, Node ≥…
npm run build
npx static-link-sentinel # auto-detects dist/ build/ out/ public/ _site/
npx static-link-sentinel dist --external --site-url https://example.comWhere we use it
CI job on this site: html · lighthouse-nightly · In use
Related packages
Developer Tooling
- commit-gauge
lint Conventional Commits
- engines-gauge
align Node engine ranges
- hallume-cli
Hallume command-line tool
- monorepo-gauge
check workspace hygiene