Skip to content

Commit 947d2e0

Browse files
feat(site): unify landing + docs into Astro Starlight site (#209)
Replaces the separate Vite landing (`packages/landing/`) and MkDocs docs site with a single unified Astro 5 + Starlight site at `packages/site/`. What changed: - New `packages/site/` — Astro + Starlight unified site. Custom marketing landing at `/`, Starlight docs served at `/<slug>/` (e.g. `/getting-started/`, `/configuration/`), single design system shared between both surfaces. - Restored the original landing's hero, device frames, showcase videos, and palette (the magic that was lost in PR #208). - Migrated all 14 docs pages from `docs/*.md` into Starlight content collections. - Dropped Python from CI: `.github/workflows/pages.yml` now uses `withastro/action@v2` — no more `pygments` / `pymdown-extensions` version drift. - Deleted: `docs/`, `mkdocs.yml`, `packages/landing/`, `.github/workflows/landing.yml`. Notes: - Pinned `@astrojs/sitemap` to `3.6.0` via overrides because newer versions import `zod/v4` which Astro 5.18 doesn't ship. - All cross-links use relative slug paths (e.g. `[text](../configuration/)`) so they resolve correctly under the `/TermBeam` GitHub Pages base prefix. Supersedes #208 (which will be closed). Closes #207 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 168f67b commit 947d2e0

80 files changed

Lines changed: 9692 additions & 3905 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,25 +118,26 @@ TermBeam is a Node.js CLI tool that exposes a local PTY (pseudo-terminal) over H
118118
TermBeam has two layers of documentation that must stay in sync with code changes:
119119

120120
- **`README.md`** — user-facing quick reference (features, CLI flags, security summary). Update when adding/removing CLI flags, features, or changing defaults.
121-
- **`docs/`**full MkDocs Material site deployed to GitHub Pages. Navigation defined in `mkdocs.yml`. Update the relevant page when changing behavior:
122-
- `docs/configuration.md` — CLI flags and env vars
123-
- `docs/resume.md``termbeam resume` and `termbeam list` commands
124-
- `docs/security.md` — auth, headers, threat model
125-
- `docs/api.md` — HTTP and WebSocket API
126-
- `docs/architecture.md` — system design
127-
- `docs/getting-started.md` — installation and first run
121+
- **`packages/site/`**unified Astro Starlight site (landing + docs) deployed to GitHub Pages. Navigation defined in `packages/site/astro.config.mjs` (sidebar groups). Docs content lives in `packages/site/src/content/docs/`. Update the relevant page when changing behavior:
122+
- `configuration.md` — CLI flags and env vars
123+
- `resume.md``termbeam resume` and `termbeam list` commands
124+
- `security.md` — auth, headers, threat model
125+
- `api.md` — HTTP and WebSocket API
126+
- `architecture.md` — system design
127+
- `getting-started.md` — installation and first run
128128

129-
Preview docs locally: `pip install mkdocs-material && mkdocs serve`
129+
Use Starlight admonition syntax (`:::note`, `:::tip`, `:::caution`, `:::danger`) — not MkDocs `!!!` blocks. Cross-link with **relative slug paths** (e.g. `[text](../configuration/)`) — the browser resolves these against the current page URL, preserving the `/TermBeam` base prefix. Never use root-absolute paths like `/configuration/` (they bypass the base prefix and 404 on GitHub Pages) or `.md` paths (Astro content collections do not auto-rewrite `.md` extensions inside `src/content/docs/`).
130130

131-
Changes to `docs/` or `mkdocs.yml` pushed to `main` auto-deploy to GitHub Pages.
131+
Preview locally: `cd packages/site && npm install && npm run dev`. Build: `npm run build` (outputs to `packages/site/dist/`).
132+
133+
Changes to `packages/site/**` pushed to `main` auto-deploy to GitHub Pages.
132134

133135
## CI and Publishing
134136

135137
- Release workflow: `.github/workflows/release.yml` bumps version, updates `CHANGELOG.md`, tags, and publishes to npm.
136138
- `prepublishOnly` runs `npm run build:frontend && npm test` before publish.
137139
- `postinstall` fixes `node-pty` prebuild permissions (spawn-helper).
138-
- Landing site (`packages/landing/`) deploys via `.github/workflows/landing.yml`.
139-
- Docs deploy via `.github/workflows/pages.yml`.
140+
- Site (landing + docs) deploys via `.github/workflows/pages.yml` from `packages/site/`.
140141

141142
**IMPORTANT:** When asked to create a PR, open a PR, push to main, publish, release, or submit changes, **always use the `publish` skill**. It orchestrates the full workflow: local tests, lint, coverage, docs check, commit, push (or PR flow with proper branch naming), CI verification, and release. Do not manually run `gh pr create` or `git push origin main` — the skill handles all of this with the correct conventions.
142143

.github/skills/publish/SKILL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ git --no-pager diff HEAD
6464
Compare the changes against the documentation files. Check:
6565

6666
- **`README.md`** — if any CLI flags, features, or defaults changed, README must reflect them.
67-
- **`docs/configuration.md`** — if CLI flags or env vars changed.
68-
- **`docs/security.md`** — if auth, headers, or security behavior changed.
69-
- **`docs/api.md`** — if HTTP or WebSocket API changed.
70-
- **`docs/architecture.md`** — if system design or module responsibilities changed.
71-
- **`docs/getting-started.md`** — if installation or first-run steps changed.
67+
- **`packages/site/src/content/docs/configuration.md`** — if CLI flags or env vars changed.
68+
- **`packages/site/src/content/docs/security.md`** — if auth, headers, or security behavior changed.
69+
- **`packages/site/src/content/docs/api.md`** — if HTTP or WebSocket API changed.
70+
- **`packages/site/src/content/docs/architecture.md`** — if system design or module responsibilities changed.
71+
- **`packages/site/src/content/docs/getting-started.md`** — if installation or first-run steps changed.
7272
and any other docs files relevant to the changes.
7373

7474
Use read-only subagents to verify documentation accuracy. Assign each subagent
@@ -231,7 +231,7 @@ If CI or Security fails:
231231

232232
## Step 7 — Wait for docs pages deployment (if applicable)
233233

234-
Only if docs files (`docs/**` or `mkdocs.yml`) were changed in the push:
234+
Only if site files (`packages/site/**`) were changed in the push:
235235

236236
```bash
237237
gh run list --workflow=pages.yml --branch=main --limit=1 --json databaseId,status,conclusion

.github/workflows/landing.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/pages.yml

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,56 @@
1-
name: Deploy Docs
1+
name: Deploy site
22

33
on:
44
push:
55
branches: [main]
66
paths:
7-
- docs/**
8-
- mkdocs.yml
7+
- 'packages/site/**'
8+
- '.github/workflows/pages.yml'
9+
pull_request:
10+
paths:
11+
- 'packages/site/**'
12+
- '.github/workflows/pages.yml'
13+
workflow_dispatch:
914

1015
permissions:
1116
contents: read
1217
pages: write
1318
id-token: write
1419

1520
concurrency:
16-
group: pages
21+
group: pages-${{ github.ref }}
1722
cancel-in-progress: true
1823

1924
jobs:
20-
deploy:
21-
environment:
22-
name: github-pages
23-
url: ${{ steps.deployment.outputs.page_url }}
25+
build:
2426
runs-on: ubuntu-latest
27+
defaults:
28+
run:
29+
working-directory: packages/site
2530
steps:
2631
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
27-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
32+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2833
with:
29-
python-version: '3.x'
30-
- run: pip install --require-hashes -r docs/requirements.txt
31-
- run: mkdocs build --strict
32-
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
33-
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
34+
node-version: '20'
35+
cache: npm
36+
cache-dependency-path: packages/site/package-lock.json
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Build with Astro
40+
run: npm run build
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
3443
with:
35-
path: site
36-
- id: deployment
37-
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
44+
path: packages/site/dist
45+
46+
deploy:
47+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
48+
needs: build
49+
runs-on: ubuntu-latest
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deploy.outputs.page_url }}
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deploy
56+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ frontend/node_modules/
1313

1414
# Build output from src/frontend/ (rebuilt by prepublishOnly)
1515
public/
16+
!packages/site/public/
1617
*.tsbuildinfo
1718
.playwright-mcp/
1819
test-diff.md
20+
21+
# Astro Starlight site (packages/site/)
22+
packages/site/.astro/
23+
packages/site/dist/
24+
packages/site/node_modules/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ https://github.com/user-attachments/assets/9dd4f3d7-f017-4314-9b3a-f6a5688e3671
2424

2525
<table align="center">
2626
<tr>
27-
<td align="center"><img src="docs/assets/screenshots/mobile-session-hub.jpeg" alt="Session hub on mobile" width="250" /></td>
28-
<td align="center"><img src="docs/assets/screenshots/mobile-terminal.jpeg" alt="Terminal with touch bar on mobile" width="250" /></td>
29-
<td align="center"><img src="docs/assets/screenshots/mobile-session-preview.jpeg" alt="File browser on mobile" width="250" /></td>
30-
<td align="center"><img src="docs/assets/screenshots/mobile-command-palette.jpeg" alt="Command palette on mobile" width="250" /></td>
27+
<td align="center"><img src="packages/site/public/mobile-session-hub.jpeg" alt="Session hub on mobile" width="250" /></td>
28+
<td align="center"><img src="packages/site/public/mobile-terminal.jpeg" alt="Terminal with touch bar on mobile" width="250" /></td>
29+
<td align="center"><img src="packages/site/public/mobile-session-preview.jpeg" alt="File browser on mobile" width="250" /></td>
30+
<td align="center"><img src="packages/site/public/mobile-command-palette.jpeg" alt="Command palette on mobile" width="250" /></td>
3131
</tr>
3232
</table>
3333

docs/requirements.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)