Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# check-http-status changelog

## Unreleased

### Fixed

- HTML report: the selected filter and warning badges now meet WCAG AA colour contrast in light and dark mode
- Website: main landmark, keyboard-scrollable code panels and options table, and readable buttons in dark mode
- Security: `uuid` is forced to 11.1.1 or newer (via `exceljs`)

## 2.2.0 - Oct 19, 2026

### New
Expand Down
9 changes: 5 additions & 4 deletions docs/demo.html

Large diffs are not rendered by default.

24 changes: 14 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<style>
:root {
--bg: #f7f8fa; --surface: #fff; --text: #17202b; --muted: #5d6b7c; --border: #e1e6ec;
--accent: #2563eb; --accent-soft: #e8efff; --code-bg: #0f1720; --code-text: #d8e1ea;
--accent: #2563eb; --accent-soft: #e8efff; --on-accent: #fff; --code-bg: #0f1720; --code-text: #d8e1ea;
--ok: #4ade80; --warn: #facc15; --bad: #f87171; --dim: #7c8a9b;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0d1117; --surface: #151b23; --text: #e6edf3; --muted: #8d9aaa; --border: #262f3a;
--accent: #6aa3ff; --accent-soft: #15233d; --code-bg: #0a0e14;
--accent: #6aa3ff; --accent-soft: #15233d; --on-accent: #0d1117; --code-bg: #0a0e14;
}
}
* { box-sizing: border-box; }
Expand All @@ -36,7 +36,7 @@
.copy { background: transparent; color: var(--code-text); border: 1px solid #2c3845; border-radius: 6px; padding: 4px 10px; font: 13px system-ui, sans-serif; cursor: pointer; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.terminal { background: var(--code-bg); color: var(--code-text); border-radius: 12px; padding: 0 0 14px; font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); }
.terminal .bar { display: flex; gap: 6px; padding: 12px 14px; }
.terminal .bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c3845; }
Expand Down Expand Up @@ -89,6 +89,8 @@
</nav>
</header>

<main>

<div class="hero">
<div>
<h1>Find every broken link and redirect on your website.</h1>
Expand Down Expand Up @@ -157,11 +159,11 @@ <h2>See a real report</h2>
<h2>Usage</h2>
<p class="section-lead">Requires Node.js 18.17 or newer. Run it with <code>npx</code>, install it globally, or use it as a library.</p>
<div class="tabs" role="tablist">
<button class="tab" role="tab" aria-selected="true" data-tab="cli">Command line</button>
<button class="tab" role="tab" aria-selected="false" data-tab="node">Node.js</button>
<button class="tab" role="tab" aria-selected="false" data-tab="ci">GitHub Actions</button>
<button class="tab" role="tab" id="tab-cli" aria-controls="panel-cli" aria-selected="true" data-tab="cli">Command line</button>
<button class="tab" role="tab" id="tab-node" aria-controls="panel-node" aria-selected="false" data-tab="node">Node.js</button>
<button class="tab" role="tab" id="tab-ci" aria-controls="panel-ci" aria-selected="false" data-tab="ci">GitHub Actions</button>
</div>
<div class="panel" id="panel-cli"><pre><span class="t-dim"># Crawl a site, skip /docs (still listed), save an Excel report</span>
<div class="panel" id="panel-cli" role="tabpanel" aria-labelledby="tab-cli" tabindex="0"><pre><span class="t-dim"># Crawl a site, skip /docs (still listed), save an Excel report</span>
npx check-http-status https://www.example.com --exclude /docs -o report.xlsx

<span class="t-dim"># Optional: add a sitemap to also find orphan pages; HTML report</span>
Expand All @@ -177,7 +179,7 @@ <h2>Usage</h2>
<span class="t-dim"># Install globally</span>
npm install -g check-http-status
check-http-status --help</pre></div>
<div class="panel" id="panel-node" hidden><pre>const checkHttpStatus = require('check-http-status');
<div class="panel" id="panel-node" role="tabpanel" aria-labelledby="tab-node" tabindex="0" hidden><pre>const checkHttpStatus = require('check-http-status');

<span class="t-dim">// Just the website URL: pages are found by crawling, no sitemap needed</span>
const report = await checkHttpStatus({
Expand All @@ -199,7 +201,7 @@ <h2>Usage</h2>
for (const r of report.results.filter((r) => r.category === 'Not Found')) {
console.log(r.url, 'found on', r.foundOn.map((s) => s.page));
}</pre></div>
<div class="panel" id="panel-ci" hidden><pre><span class="t-dim"># .github/workflows/links.yml</span>
<div class="panel" id="panel-ci" role="tabpanel" aria-labelledby="tab-ci" tabindex="0" hidden><pre><span class="t-dim"># .github/workflows/links.yml</span>
name: Check links
on:
schedule: [{ cron: '0 6 * * 1' }]
Expand All @@ -219,7 +221,7 @@ <h2>Usage</h2>
<section id="options">
<h2>Options</h2>
<p class="section-lead">The CLI flags and Node.js options are equivalent. Run <code>check-http-status --help</code> for the full list.</p>
<div class="tablewrap">
<div class="tablewrap" role="region" aria-label="Options" tabindex="0">
<table class="opts">
<thead><tr><th>CLI</th><th>Node.js</th><th>Default</th><th>Description</th></tr></thead>
<tbody>
Expand Down Expand Up @@ -267,6 +269,8 @@ <h2>Upgrading from v1</h2>
</div>
</section>

</main>

<footer>
<span>MIT licensed · by <a href="https://www.trunkcode.com/">TrunkCode</a></span>
<span><a href="https://github.com/trunkcode/check-http-status">GitHub</a> · <a href="https://www.npmjs.com/package/check-http-status">npm</a> · <a href="https://github.com/trunkcode/check-http-status/issues">Report an issue</a></span>
Expand Down
Binary file modified docs/sample-report.xlsx
Binary file not shown.
7 changes: 4 additions & 3 deletions lib/report/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<style>
:root {
--bg: #f5f7fa; --card: #fff; --text: #1d2733; --muted: #607085; --border: #dde3ea;
--accent: #2563eb; --ok: #15803d; --ok-bg: #e6f4ea; --warn: #a16207; --warn-bg: #fff4d6;
--accent: #2563eb; --accent-strong: #1d4ed8; --ok: #15803d; --ok-bg: #e6f4ea; --warn: #854d0e; --warn-bg: #fff4d6;
--bad: #b91c1c; --bad-bg: #fde2e1; --gray-bg: #eef1f5;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #0f141a; --card: #171e26; --text: #e4e9ef; --muted: #8b9aab; --border: #2a3440;
--accent: #60a5fa; --ok: #4ade80; --ok-bg: #12301d; --warn: #facc15; --warn-bg: #3a300c;
--accent: #60a5fa; --accent-strong: #1e40af; --ok: #4ade80; --ok-bg: #12301d; --warn: #facc15; --warn-bg: #3a300c;
--bad: #f87171; --bad-bg: #3b1515; --gray-bg: #222b35;
}
}
Expand All @@ -36,7 +36,8 @@
button:disabled { opacity: .45; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.chip.active small { opacity: 1; }
.chip small { opacity: .75; margin-left: 4px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; min-width: 720px; }
Expand Down
13 changes: 8 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,8 @@
"eslint": "^10.11.0",
"globals": "^17.13.0",
"typescript": "^7.0.2"
},
"overrides": {
"uuid": "^11.1.1"
}
}
Loading