From b4ce338ae63c12491eb37bfe84760acd7d2431d6 Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:11:41 +0100
Subject: [PATCH 1/9] feat: add astro specific `.prettierrc` so that editors
(vscode) can auto-format files not in /website
---
.prettierrc | 12 +-----------
website/.prettierrc | 11 +++++++++++
2 files changed, 12 insertions(+), 11 deletions(-)
create mode 100644 website/.prettierrc
diff --git a/.prettierrc b/.prettierrc
index d87faa5..0967ef4 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,11 +1 @@
-{
- "plugins": ["prettier-plugin-astro"],
- "overrides": [
- {
- "files": "*.astro",
- "options": {
- "parser": "astro"
- }
- }
- ]
-}
+{}
diff --git a/website/.prettierrc b/website/.prettierrc
new file mode 100644
index 0000000..d87faa5
--- /dev/null
+++ b/website/.prettierrc
@@ -0,0 +1,11 @@
+{
+ "plugins": ["prettier-plugin-astro"],
+ "overrides": [
+ {
+ "files": "*.astro",
+ "options": {
+ "parser": "astro"
+ }
+ }
+ ]
+}
From 045023c241bd0b8677c4d40a26e50dd1502ab391 Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:37:12 +0100
Subject: [PATCH 2/9] fix: add default link color
---
website/src/styles/reset.css | 1 +
1 file changed, 1 insertion(+)
diff --git a/website/src/styles/reset.css b/website/src/styles/reset.css
index f41d8d1..30dc662 100644
--- a/website/src/styles/reset.css
+++ b/website/src/styles/reset.css
@@ -54,6 +54,7 @@ p {
a:not([class]) {
text-decoration-skip-ink: auto;
color: currentColor;
+ color: var(--sapphire);
}
/* Make images easier to work with */
img,
From 649f046c5253460a344a15c8726697c1a92b61b4 Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:37:31 +0100
Subject: [PATCH 3/9] feat: add global table and code styles
---
website/src/styles/global.css | 72 +++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/website/src/styles/global.css b/website/src/styles/global.css
index 140f72e..eb01ed5 100644
--- a/website/src/styles/global.css
+++ b/website/src/styles/global.css
@@ -111,3 +111,75 @@ button,
align-items: center;
gap: 0.5rem;
}
+
+/* ── Table ─────────────────────────────────────────────────────── */
+
+table {
+ --stroke: 1px solid var(--surface1);
+ border: var(--stroke);
+ border-collapse: collapse;
+ width: 100%;
+}
+
+th {
+ text-align: left;
+ font-weight: bold;
+}
+
+thead th {
+ padding-block: 0.75rem;
+}
+
+td,
+th {
+ padding: 0.75rem;
+}
+
+th:not(:only-of-type) {
+ border-block-end: var(--stroke);
+}
+
+th:only-of-type {
+ border-inline-end: var(--stroke);
+}
+
+:is(th, td) ~ :is(th, td) {
+ border-inline-start: var(--stroke);
+}
+
+tr + tr :is(th, td) {
+ border-block-start: var(--stroke);
+}
+
+/* ── Code ─────────────────────────────────────────────────────── */
+
+:is(code, kbd, samp) {
+ background: var(--crust);
+ border-radius: 2px;
+
+ @media (prefers-color-scheme: dark) {
+ background: var(--surface0);
+ }
+
+ font-family: var(--font-mono);
+ padding: 0.2em 0.2em 0.05em 0.2em;
+ hyphens: none;
+ tab-size: 2;
+ text-align: left;
+ word-spacing: normal;
+ word-break: normal;
+ word-wrap: normal;
+ box-decoration-break: clone;
+}
+
+pre:has(code) {
+ width: max-content;
+ max-width: 100%;
+ overflow-x: auto;
+}
+
+pre code {
+ border: none;
+ background: none;
+ padding: 0;
+}
From 5cebe7a7ebba6502d027a6b982f7918a968afb81 Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:38:14 +0100
Subject: [PATCH 4/9] feat: add usage table to homepage and general tidy up
---
website/src/pages/index.astro | 156 +++++++++++++++-------------------
1 file changed, 70 insertions(+), 86 deletions(-)
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro
index 034af07..84dcfee 100644
--- a/website/src/pages/index.astro
+++ b/website/src/pages/index.astro
@@ -29,7 +29,9 @@ import HdiLogo from "../components/HdiLogo.astro";
>
+ fill="currentColor"
+ >
+
{VERSION}
@@ -48,9 +50,7 @@ import HdiLogo from "../components/HdiLogo.astro";
Install
-
- Works on macOS and Linux (probably WSL2 also).
-
+ Works on macOS and Linux (probably WSL2 also).
@@ -76,39 +76,66 @@ import HdiLogo from "../components/HdiLogo.astro";
etc. It extracts the fenced code blocks from matching sections and
presents them as an interactive, executable list.
+
+
+ Read the blog post →
+
+
Usage
- $ cd some-project
-$ hdi
-[hdi] some-project
- ▸ Installation
- ▶ npm install
- cp .env.example .env
+
+
+
+
+ | Command |
+ Description |
+
+
+
+
+ hdi |
+ Interactive picker — shows all sections (default) |
+
+
+ hdi install |
+ Just install/setup commands (aliases: setup, i) |
+
+
+ hdi run |
+ Just run/start commands (aliases: start, r) |
+
+
+ hdi test |
+ Just test commands (alias: t) |
+
+
+ hdi deploy |
+ Just deploy/release commands and platform detection (alias: d) |
+
+
+ hdi all |
+ All sections (aliases: a) |
+
+
+
- ▸ Run
- npm run dev
- ↑↓ navigate ⇥ sections ⏎ execute c copy q quit
-
- Full documentation on GitHub →
-
-
-
@@ -118,42 +145,39 @@ $ hdi
/* ── About page ─────────────────────────────────────────────────────── */
.about {
+ --space: 3rem;
+
flex: 1;
padding: 2rem 1.5rem;
max-width: 48rem;
margin: 0 auto;
width: 100%;
- --space: 3rem;
-
h2 {
font-size: 1.25rem;
color: var(--sapphire);
margin-bottom: 1.5rem;
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
}
h2::before {
content: "▸ ";
}
+ h2::after {
+ content: "";
+ flex: 1;
+ background-color: var(--surface1);
+ block-size: 1px;
+ }
+
p {
line-height: 1.5;
-
- code {
- background: var(--crust);
- padding: 0.125em 0.375em;
- border-radius: 2px;
-
- @media (prefers-color-scheme: dark) {
- background: var(--surface0);
- }
- }
+ margin-block-start: 0.75rem;
}
}
- .about .links-section {
- margin-top: 1.5rem;
- }
-
/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
@@ -165,8 +189,8 @@ $ hdi
}
.hero-header {
- align-items: center;
--space: 1.5rem;
+ align-items: center;
}
.hero h1 {
@@ -178,8 +202,8 @@ $ hdi
}
.hero-content {
- align-items: center;
--space: 1.5rem;
+ align-items: center;
}
.hero-text {
@@ -213,62 +237,22 @@ $ hdi
border: 0.0625rem solid var(--surface0);
}
- .demo-link {
- margin-top: 0.75rem;
- text-align: left;
- }
-
- .demo-link a {
- color: var(--sapphire);
- }
-
/* ── Install ─────────────────────────────────────────────────────── */
.install-note {
- margin-top: 0.75rem;
color: var(--subtext0);
}
/* ── Usage ─────────────────────────────────────────────────────── */
- .usage-block {
- background: var(--mantle);
- border: 0.0625rem solid var(--surface0);
- border-radius: 0.375rem;
- padding: 1rem 1.25rem;
- overflow-x: auto;
- line-height: 1.6;
- margin-bottom: 1.25rem;
- }
-
- .usage-block code {
- font-family: var(--font-mono);
- color: var(--text);
- }
-
- .u-yellow {
- color: var(--yellow);
- }
- .u-sapphire {
- color: var(--sapphire);
- }
- .u-green {
- color: var(--green);
- }
-
- .usage-docs-link a {
- color: var(--sapphire);
- text-decoration: none;
- }
-
- .usage-docs-link a:hover {
- text-decoration: underline;
+ td:first-child,
+ th:first-child {
+ min-width: min(20ch, 30vw);
}
/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 43.75rem) {
- /* About */
.about {
padding: 1rem 1.5rem 2rem;
}
From 3f3b162ac207eaa49071ae73dbc1475aed91558c Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:43:35 +0100
Subject: [PATCH 5/9] refactor: render table of commands via markdown for
better maintainability
---
website/src/data/commands.md | 8 ++++++
website/src/pages/index.astro | 46 ++++++-----------------------------
2 files changed, 15 insertions(+), 39 deletions(-)
create mode 100644 website/src/data/commands.md
diff --git a/website/src/data/commands.md b/website/src/data/commands.md
new file mode 100644
index 0000000..cc1906b
--- /dev/null
+++ b/website/src/data/commands.md
@@ -0,0 +1,8 @@
+| Command | Description |
+| ------------- | ---------------------------------------------------------------- |
+| `hdi` | Interactive picker — shows all sections (default) |
+| `hdi install` | Just install/setup commands (aliases: `setup`, `i`) |
+| `hdi run` | Just run/start commands (aliases: `start`, `r`) |
+| `hdi test` | Just test commands (alias: `t`) |
+| `hdi deploy` | Just deploy/release commands and platform detection (alias: `d`) |
+| `hdi all` | All sections (aliases: `a`) |
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro
index 84dcfee..143e210 100644
--- a/website/src/pages/index.astro
+++ b/website/src/pages/index.astro
@@ -5,6 +5,7 @@ import DemoLatte from "../assets/demo-latte.gif";
import DemoMocha from "../assets/demo-mocha.gif";
import { VERSION } from "../data/data";
import HdiLogo from "../components/HdiLogo.astro";
+import { Content as CommandTable } from "../data/commands.md";
---
@@ -90,43 +91,9 @@ import HdiLogo from "../components/HdiLogo.astro";
Usage
-
-
-
-
- | Command |
- Description |
-
-
-
-
- hdi |
- Interactive picker — shows all sections (default) |
-
-
- hdi install |
- Just install/setup commands (aliases: setup, i) |
-
-
- hdi run |
- Just run/start commands (aliases: start, r) |
-
-
- hdi test |
- Just test commands (alias: t) |
-
-
- hdi deploy |
- Just deploy/release commands and platform detection (alias: d) |
-
-
- hdi all |
- All sections (aliases: a) |
-
-
-
-
-
+
+
+
Date: Tue, 7 Apr 2026 23:44:04 +0100
Subject: [PATCH 6/9] style: formatting `playwright.yml`
---
website/.github/workflows/playwright.yml | 36 ++++++++++++------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/website/.github/workflows/playwright.yml b/website/.github/workflows/playwright.yml
index 3eb1314..2812391 100644
--- a/website/.github/workflows/playwright.yml
+++ b/website/.github/workflows/playwright.yml
@@ -1,27 +1,27 @@
name: Playwright Tests
on:
push:
- branches: [ main, master ]
+ branches: [main, master]
pull_request:
- branches: [ main, master ]
+ branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
- with:
- node-version: lts/*
- - name: Install dependencies
- run: npm ci
- - name: Install Playwright Browsers
- run: npx playwright install --with-deps
- - name: Run Playwright tests
- run: npx playwright test
- - uses: actions/upload-artifact@v4
- if: ${{ !cancelled() }}
- with:
- name: playwright-report
- path: playwright-report/
- retention-days: 30
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: lts/*
+ - name: Install dependencies
+ run: npm ci
+ - name: Install Playwright Browsers
+ run: npx playwright install --with-deps
+ - name: Run Playwright tests
+ run: npx playwright test
+ - uses: actions/upload-artifact@v4
+ if: ${{ !cancelled() }}
+ with:
+ name: playwright-report
+ path: playwright-report/
+ retention-days: 30
From 151ad7b16a9aef0ef2545f110cff896cf901b43b Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:49:19 +0100
Subject: [PATCH 7/9] refactor: remove dead code
---
website/src/pages/index.astro | 7 -------
1 file changed, 7 deletions(-)
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro
index 143e210..83e4f4b 100644
--- a/website/src/pages/index.astro
+++ b/website/src/pages/index.astro
@@ -164,10 +164,6 @@ import { Content as CommandTable } from "../data/commands.md";
font-weight: 400;
}
- .hero-accent {
- color: var(--yellow);
- }
-
.hero-content {
--space: 1.5rem;
align-items: center;
@@ -224,8 +220,5 @@ import { Content as CommandTable } from "../data/commands.md";
.about {
padding: 1rem 1.5rem 2rem;
}
- .links-section {
- flex-direction: column;
- }
}
From 45ee4ca5114ae2d09e88668117d335bffa5df124 Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:50:25 +0100
Subject: [PATCH 8/9] refactor: move `commands.md` to /content
---
website/src/{data => content}/commands.md | 0
website/src/pages/index.astro | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename website/src/{data => content}/commands.md (100%)
diff --git a/website/src/data/commands.md b/website/src/content/commands.md
similarity index 100%
rename from website/src/data/commands.md
rename to website/src/content/commands.md
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro
index 83e4f4b..e365df7 100644
--- a/website/src/pages/index.astro
+++ b/website/src/pages/index.astro
@@ -5,7 +5,7 @@ import DemoLatte from "../assets/demo-latte.gif";
import DemoMocha from "../assets/demo-mocha.gif";
import { VERSION } from "../data/data";
import HdiLogo from "../components/HdiLogo.astro";
-import { Content as CommandTable } from "../data/commands.md";
+import { Content as CommandTable } from "../content/commands.md";
---
From de2156e9124a2c3290ddd117a0e5577cdea2d887 Mon Sep 17 00:00:00 2001
From: Max Elkins
Date: Tue, 7 Apr 2026 23:58:50 +0100
Subject: [PATCH 9/9] refactor: move link styles to global
---
website/src/styles/global.css | 14 ++++++++++----
website/src/styles/reset.css | 1 -
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/website/src/styles/global.css b/website/src/styles/global.css
index eb01ed5..80fe63c 100644
--- a/website/src/styles/global.css
+++ b/website/src/styles/global.css
@@ -23,17 +23,23 @@ body {
flex-direction: column;
}
-/* h1,
+h1,
h2,
h3,
h4 {
text-wrap: balance;
-} */
+}
-/* p {
+p {
text-wrap: pretty;
-} */
+}
+
+/* Default link style */
+a:not([class]) {
+ color: var(--sapphire);
+}
+/* Links with a class (typically customised) */
a {
color: currentColor;
}
diff --git a/website/src/styles/reset.css b/website/src/styles/reset.css
index 30dc662..f41d8d1 100644
--- a/website/src/styles/reset.css
+++ b/website/src/styles/reset.css
@@ -54,7 +54,6 @@ p {
a:not([class]) {
text-decoration-skip-ink: auto;
color: currentColor;
- color: var(--sapphire);
}
/* Make images easier to work with */
img,