Skip to content

Commit a990971

Browse files
committed
Initial Starlight scaffold for @libar-dev docs site
- Starlight (Astro) with astro-mermaid for diagram rendering - Custom landing page with design tokens from unified prototype - Content sync script pulling docs from delivery-process and dp-mini-demo - Sidebar: Tutorial, Guides, Reference, Product Areas, Decisions, Generated - GitHub Pages deployment workflow with multi-repo checkout - Pagefind search across all 54 content pages
0 parents  commit a990971

21 files changed

Lines changed: 6938 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout website repo
18+
uses: actions/checkout@v4
19+
20+
- name: Checkout delivery-process repo
21+
uses: actions/checkout@v4
22+
with:
23+
repository: libar-dev/delivery-process
24+
ref: v1.0.0-pre.0
25+
path: delivery-process
26+
27+
- name: Checkout dp-mini-demo repo
28+
uses: actions/checkout@v4
29+
with:
30+
repository: libar-dev/dp-mini-demo
31+
path: dp-mini-demo
32+
33+
- name: Setup pnpm
34+
uses: pnpm/action-setup@v4
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 22
40+
cache: pnpm
41+
42+
- name: Install dependencies
43+
run: pnpm install
44+
45+
# prebuild script runs sync-content.mjs automatically via package.json
46+
- name: Build site
47+
run: pnpm build
48+
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: dist/
53+
54+
deploy:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4
64+
65+
# NOTE: When switching to custom domain (libar.dev):
66+
# 1. Add public/CNAME file containing "libar.dev"
67+
# 2. Update astro.config.mjs: site → 'https://libar.dev', remove base
68+
# 3. Configure DNS: A records → 185.199.108-111.153, or CNAME → libar-dev.github.io
69+
# 4. GitHub Settings → Pages → Custom domain → libar.dev → Enable HTTPS

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# Synced content (generated by scripts/sync-content.mjs at build time)
24+
# Hand-crafted pages (index.mdx, getting-started.md) are NOT ignored
25+
src/content/docs/delivery-process/guides/
26+
src/content/docs/delivery-process/reference/
27+
src/content/docs/delivery-process/product-areas/
28+
src/content/docs/delivery-process/decisions/
29+
src/content/docs/delivery-process/generated/
30+
src/content/docs/delivery-process/tutorial/

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# @libar-dev/website
2+
3+
Documentation website for the `@libar-dev` package ecosystem. Built with [Starlight](https://starlight.astro.build) (Astro).
4+
5+
## Packages Documented
6+
7+
- **[@libar-dev/delivery-process](https://github.com/libar-dev/delivery-process)** — Context engineering toolkit for AI-assisted codebases
8+
9+
## Development
10+
11+
```bash
12+
pnpm install
13+
pnpm dev # Start dev server at localhost:4321
14+
```
15+
16+
The `dev` command automatically syncs content from sibling directories before starting.
17+
18+
## Content Pipeline
19+
20+
Content is synced from source packages at build time via `scripts/sync-content.mjs`:
21+
22+
| Source | Content |
23+
|--------|---------|
24+
| `../delivery-process/docs/` | Manual documentation (guides, reference) |
25+
| `../delivery-process/docs-live/` | Auto-generated product areas, ADRs |
26+
| `../delivery-process/docs-generated/` | Business rules, taxonomy, reference |
27+
| `../dp-mini-demo/TUTORIAL-ARTICLE-v1.md` | 10-part tutorial |
28+
29+
The script injects Starlight frontmatter, rewrites internal links, and splits the tutorial into separate pages.
30+
31+
## Commands
32+
33+
| Command | Action |
34+
|---------|--------|
35+
| `pnpm dev` | Sync content + start dev server |
36+
| `pnpm build` | Sync content + build production site |
37+
| `pnpm sync` | Sync content only |
38+
| `pnpm preview` | Preview production build locally |
39+
40+
## Deployment
41+
42+
Deployed to GitHub Pages via `.github/workflows/deploy.yml`. The workflow checks out `delivery-process` and `dp-mini-demo` repos as siblings for the content sync.
43+
44+
**Current URL:** `https://libar-dev.github.io/website`
45+
**Planned URL:** `https://libar.dev`

astro.config.mjs

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
import mermaid from 'astro-mermaid';
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
// Start with GitHub Pages default; switch to site: 'https://libar.dev' + remove base when DNS is configured
9+
site: 'https://libar-dev.github.io',
10+
base: '/website',
11+
integrations: [
12+
// MUST come before starlight — ordering is critical for mermaid fences to be processed
13+
mermaid(),
14+
starlight({
15+
title: '@libar-dev',
16+
social: [
17+
{
18+
icon: 'github',
19+
label: 'GitHub',
20+
href: 'https://github.com/libar-dev',
21+
},
22+
],
23+
customCss: ['./src/styles/tokens.css', './src/styles/starlight-overrides.css'],
24+
head: [
25+
{
26+
tag: 'link',
27+
attrs: {
28+
rel: 'preconnect',
29+
href: 'https://fonts.googleapis.com',
30+
},
31+
},
32+
{
33+
tag: 'link',
34+
attrs: {
35+
rel: 'preconnect',
36+
href: 'https://fonts.gstatic.com',
37+
crossorigin: true,
38+
},
39+
},
40+
{
41+
tag: 'link',
42+
attrs: {
43+
href: 'https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:wght@400;700&family=Outfit:wght@300;400;500;600;700&display=swap',
44+
rel: 'stylesheet',
45+
},
46+
},
47+
],
48+
sidebar: [
49+
{
50+
label: 'delivery-process',
51+
items: [
52+
{
53+
label: 'Overview',
54+
slug: 'delivery-process',
55+
},
56+
{
57+
label: 'Getting Started',
58+
slug: 'delivery-process/getting-started',
59+
},
60+
{
61+
label: 'Tutorial',
62+
autogenerate: { directory: 'delivery-process/tutorial' },
63+
},
64+
{
65+
label: 'Guides',
66+
autogenerate: { directory: 'delivery-process/guides' },
67+
},
68+
{
69+
label: 'Reference',
70+
autogenerate: { directory: 'delivery-process/reference' },
71+
},
72+
{
73+
label: 'Product Areas',
74+
autogenerate: { directory: 'delivery-process/product-areas' },
75+
},
76+
{
77+
label: 'Architecture Decisions',
78+
collapsed: true,
79+
autogenerate: { directory: 'delivery-process/decisions' },
80+
},
81+
{
82+
label: 'Generated Reference',
83+
collapsed: true,
84+
autogenerate: { directory: 'delivery-process/generated' },
85+
},
86+
],
87+
},
88+
],
89+
}),
90+
],
91+
});

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "@libar-dev/website",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"private": true,
6+
"scripts": {
7+
"sync": "node scripts/sync-content.mjs",
8+
"prebuild": "node scripts/sync-content.mjs",
9+
"dev": "node scripts/sync-content.mjs && astro dev",
10+
"build": "astro build",
11+
"preview": "astro preview",
12+
"astro": "astro"
13+
},
14+
"dependencies": {
15+
"@astrojs/starlight": "^0.37.6",
16+
"astro": "^5.6.1",
17+
"astro-mermaid": "^1.3.1",
18+
"mermaid": "^11.12.3",
19+
"sharp": "^0.34.2"
20+
},
21+
"devDependencies": {
22+
"@libar-dev/delivery-process": "github:libar-dev/delivery-process#v1.0.0-pre.0"
23+
}
24+
}

0 commit comments

Comments
 (0)