Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
version: 11.21.0

- name: Set up Node
uses: actions/setup-node@v6
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.12.0
24.19.0
2 changes: 1 addition & 1 deletion website/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.16.0
24.19.0
10 changes: 6 additions & 4 deletions website/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Site URL: `https://bub.build`

| Layer | Tool |
|---------------|----------------------------------------|
| Framework | **Astro 6** (static output) |
| Docs | **@astrojs/starlight** ≥ 0.38 |
| Framework | **Astro 7** (static output, Vite 8/Rolldown) |
| Docs | **@astrojs/starlight** ≥ 0.41 |
| Styling | **Tailwind CSS v4** via `@tailwindcss/vite` + `@astrojs/starlight-tailwind` |
| Component lib | shadcn/ui conventions (base-vega style) |
| Animations | `motion` (formerly Framer Motion) |
Expand Down Expand Up @@ -139,7 +139,7 @@ Follows the **exact pattern** from [`withastro/starlight/docs`](https://github.c
**Locale configuration** — `astro.config.mjs`:
- English is the **`root` locale** — content files live under `src/content/docs/docs/` (e.g., `docs/getting-started/run-bub-locally.mdx`).
- Other locales get **subdirectories**: `src/content/docs/zh-cn/docs/getting-started/run-bub-locally.mdx`.
- The inner `docs/` directory creates the `/docs/` URL prefix — Starlight 0.38 has no `routePrefix` option, so this nesting is the standard way to namespace docs routes.
- The inner `docs/` directory creates the `/docs/` URL prefix, keeping documentation routes namespaced without changing content IDs.
- This keeps the URL scheme consistent: `/docs/…` for docs, `/posts/…` for blog.

```js
Expand All @@ -165,10 +165,12 @@ locales: {
sidebar: [{
label: 'Getting Started',
translations: { 'zh-CN': '快速开始' },
autogenerate: { directory: 'docs/getting-started' },
items: [{ autogenerate: { directory: 'docs/getting-started' } }],
}]
```

Astro 7 uses the Sätteri Markdown processor by default. Keep `astro-mermaid` at 2.1 or newer and register it before Starlight so Mermaid code blocks are transformed by the active processor.

**Content schema** — `src/content.config.ts`:
- Uses `docsLoader()` + `docsSchema()` from `@astrojs/starlight/loaders` and `@astrojs/starlight/schema`.
- Uses `i18nLoader()` + `i18nSchema()` for the i18n collection.
Expand Down
18 changes: 9 additions & 9 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export default defineConfig({
},
},
integrations: [
// Must come BEFORE starlight so its remark plugin transforms `mermaid`
// code blocks before Starlight's markdown pipeline highlights them.
// Keep this before Starlight so Mermaid registers with Astro's active
// Markdown processor before Starlight configures syntax highlighting.
mermaid({
theme: 'neutral',
autoTheme: true,
Expand All @@ -60,7 +60,7 @@ export default defineConfig({
},
// Use the resolved file URL so Vite's module graph reliably
// includes global.css on every Starlight docs page in dev mode.
// (Astro v6 scopes CSS per-page from the import graph; with a
// (Astro scopes CSS per-page from the import graph; with a
// relative path Vite occasionally fails to resolve / dedupe in
// dev, leaving the docs route unstyled even though
// `astro build` + preview both work.)
Expand All @@ -81,32 +81,32 @@ export default defineConfig({
{
label: 'Getting Started',
translations: { 'zh-CN': '快速开始' },
autogenerate: { directory: 'docs/getting-started' },
items: [{ autogenerate: { directory: 'docs/getting-started' } }],
},
{
label: 'Concepts',
translations: { 'zh-CN': '概念' },
autogenerate: { directory: 'docs/concepts' },
items: [{ autogenerate: { directory: 'docs/concepts' } }],
},
{
label: 'Operate',
translations: { 'zh-CN': '运行' },
autogenerate: { directory: 'docs/operate' },
items: [{ autogenerate: { directory: 'docs/operate' } }],
},
{
label: 'Build',
translations: { 'zh-CN': '构建' },
autogenerate: { directory: 'docs/build' },
items: [{ autogenerate: { directory: 'docs/build' } }],
},
{
label: 'Tutorials',
translations: { 'zh-CN': '教程' },
autogenerate: { directory: 'docs/tutorials' },
items: [{ autogenerate: { directory: 'docs/tutorials' } }],
},
{
label: 'Reference',
translations: { 'zh-CN': '参考' },
autogenerate: { directory: 'docs/reference' },
items: [{ autogenerate: { directory: 'docs/reference' } }],
},
],
}),
Expand Down
46 changes: 21 additions & 25 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,40 @@
"name": "website",
"type": "module",
"version": "0.0.1",
"packageManager": "pnpm@11.21.0",
"engines": {
"node": ">=22.12.0"
"node": ">=24.0.0"
},
"scripts": {
"generate:github-snapshot": "node ./scripts/generate-github-snapshot.mjs",
"predev": "pnpm run generate:github-snapshot",
"dev": "astro dev",
"prebuild": "pnpm run generate:github-snapshot",
"build": "astro build",
"check": "astro check",
"preview": "wrangler dev"
},
"dependencies": {
"@astrojs/cloudflare": "^13.1.9",
"@astrojs/starlight": "^0.38.3",
"@astrojs/cloudflare": "^14.2.1",
"@astrojs/starlight": "^0.41.7",
"@astrojs/starlight-tailwind": "^5.0.0",
"@fontsource-variable/jetbrains-mono": "^5.2.8",
"@fontsource-variable/outfit": "^5.2.8",
"@fontsource/noto-sans-sc": "^5.2.9",
"@fontsource/outfit": "^5.2.8",
"@tailwindcss/vite": "^4.1.14",
"astro": "^6.1.10",
"astro-mermaid": "^2.0.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"mermaid": "^11.15.0",
"motion": "^12.38.0",
"satori": "^0.26.0",
"sharp": "^0.34.2",
"tailwind-merge": "^3.5.0",
"tw-animate-css": "^1.4.0"
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@fontsource-variable/outfit": "^5.3.0",
"@fontsource/noto-sans-sc": "^5.3.0",
"@fontsource/outfit": "^5.3.0",
"@tailwindcss/vite": "^4.3.3",
"astro": "^7.2.1",
"astro-mermaid": "^2.1.0",
"mermaid": "^11.16.1",
"motion": "^13.1.0",
"satori": "^0.29.0",
"sharp": "^0.35.3"
},
"devDependencies": {
"@lucide/astro": "^1.8.0",
"react-grab": "^0.1.32",
"tailwindcss": "^4.1.14",
"wrangler": "^4.13.2"
},
"overrides": {
"vite": "^7.3.2"
"@astrojs/check": "^0.9.10",
"@lucide/astro": "^1.31.0",
"tailwindcss": "^4.3.3",
"typescript": "^6.0.3",
"wrangler": "^4.121.0"
}
}
Loading
Loading