Skip to content

Commit 7c9f054

Browse files
committed
feat(website): add Starlight docs at /docs
- Full CLI command reference under /docs/commands/ - Configuration, environments, workers, CI/CD, backups, Cloudflare, hardening, and team-users guides - Starlight sidebar wired to autogenerate commands section - Add docs link to header nav - Switch GitHub Pages workflow to pnpm to match website lockfile
1 parent f6abe90 commit 7c9f054

40 files changed

Lines changed: 4958 additions & 3 deletions

.github/workflows/website.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@ jobs:
2525
working-directory: website
2626
steps:
2727
- uses: actions/checkout@v4
28+
- uses: pnpm/action-setup@v4
29+
with:
30+
version: 9
2831
- uses: actions/setup-node@v4
2932
with:
3033
node-version: '22'
31-
- run: npm ci || npm install
32-
- run: npm run build
34+
cache: 'pnpm'
35+
cache-dependency-path: website/pnpm-lock.yaml
36+
- run: pnpm install --frozen-lockfile
37+
- run: pnpm build
3338
env:
3439
GITHUB_ACTIONS: 'true'
3540
- uses: actions/configure-pages@v5

website/astro.config.mjs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,51 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
34

45
// https://astro.build/config
56
export default defineConfig({
67
site: 'https://shipnode.dev',
78
base: '/',
9+
integrations: [
10+
starlight({
11+
title: 'ShipNode',
12+
description: 'Deploy Node.js apps to a single VPS — zero-downtime, PM2, Caddy, SSH.',
13+
social: [
14+
{ icon: 'github', label: 'GitHub', href: 'https://github.com/devalade/shipnode' },
15+
],
16+
customCss: ['./src/styles/docs.css'],
17+
sidebar: [
18+
{
19+
label: 'Getting started',
20+
items: [
21+
{ label: 'Introduction', slug: 'docs' },
22+
{ label: 'Install', slug: 'docs/install' },
23+
{ label: 'Quick start', slug: 'docs/quick-start' },
24+
],
25+
},
26+
{
27+
label: 'Configuration',
28+
items: [
29+
{ label: 'shipnode.config.ts', slug: 'docs/configuration' },
30+
{ label: 'Multi-environment', slug: 'docs/environments' },
31+
{ label: 'Workers', slug: 'docs/workers' },
32+
],
33+
},
34+
{
35+
label: 'Commands',
36+
items: [{ autogenerate: { directory: 'docs/commands' } }],
37+
},
38+
{
39+
label: 'Operations',
40+
items: [
41+
{ label: 'CI/CD', slug: 'docs/ci-cd' },
42+
{ label: 'Backups', slug: 'docs/backups' },
43+
{ label: 'Cloudflare Tunnel', slug: 'docs/cloudflare' },
44+
{ label: 'Server hardening', slug: 'docs/hardening' },
45+
{ label: 'Team users', slug: 'docs/users' },
46+
],
47+
},
48+
],
49+
}),
50+
],
851
});

website/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"astro": "astro"
1313
},
1414
"dependencies": {
15-
"astro": "^6.1.10"
15+
"@astrojs/starlight": "^0.39.2",
16+
"astro": "^6.1.10",
17+
"sharp": "^0.34.5"
1618
}
1719
}

0 commit comments

Comments
 (0)