Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,7 @@ jobs:
- name: Check if documentation can be built
run: |
pnpm --dir website install --frozen-lockfile
pnpm --dir website check
pnpm --dir website fmt:check
node --test website/scripts/pele.test.mjs
pnpm --dir website build
3 changes: 0 additions & 3 deletions website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ pnpm-debug.log*
.DS_Store
.vercel/output
.wrangler/

# generated data
src/data/github-snapshot.ts
25 changes: 25 additions & 0 deletions website/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 100,
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"trailingComma": "all",
"astro": {
"compressHTML": "html"
},
"sortTailwindcss": {
"stylesheet": "./src/styles/global.css"
},
"ignorePatterns": [
"dist/**",
".astro/**",
".wrangler/**",
".vercel/**",
"examples/**",
"pnpm-lock.yaml",
"**/*.json",
"**/*.md",
"**/*.mdx"
]
}
2 changes: 1 addition & 1 deletion website/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Site pages take their prefix from `src/i18n/utils.ts`. Do not put landing text i

`Astro.locals.t` reads Starlight UI strings. `Astro.locals.starlightRoute` throws on a site page. On site pages, call `useTranslations()`.

The landing page sets `prerender` to `false`. The blog routes are static. Starlight docs stay pre-rendered. Keep `disable404Route: true`.
The landing page, blog routes, and Starlight docs are all pre-rendered. Keep `disable404Route: true`.

A new locale needs all of these items:

Expand Down
6 changes: 3 additions & 3 deletions website/DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ server state. The generated Worker should have only the `ASSETS` binding, with
no automatically provisioned `SESSION` KV namespace. Verify this with
`pnpm wrangler versions upload --dry-run` after building.

GitHub repo stats are snapshotted during `pnpm build` into
`src/data/github-snapshot.ts`. The Worker does not call the GitHub API at
runtime, so `GITHUB_TOKEN` only needs to exist as a build secret.
GitHub repo stats are fetched at build time by the `github` Content Layer
collection in `src/content.config.ts`. The Worker does not call the GitHub API
at runtime, so `GITHUB_TOKEN` only needs to exist as a build secret.

The repo also includes [public/.assetsignore](./public/.assetsignore) for the
SSR Worker build:
Expand Down
63 changes: 51 additions & 12 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check
import { fileURLToPath } from 'node:url';
import { defineConfig, envField } from 'astro/config';
import { defineConfig, envField, fontProviders } from 'astro/config';
import tailwindcss from '@tailwindcss/vite';
import starlight from '@astrojs/starlight';
import cloudflare from '@astrojs/cloudflare';
Expand All @@ -19,9 +19,14 @@ const image_service =
export default defineConfig({
// Preserve HTML-aware spacing between inline elements after the Astro 7 upgrade.
compressHTML: true,
// Prefetch internal pages on hover/touch for instant navigation across docs and site pages.
prefetch: {
prefetchAll: true,
defaultStrategy: 'hover',
},
// The site has no per-user state; avoid provisioning an unused SESSION KV namespace.
session: false,
// SSG by default; landing pages opt-in to SSR via `export const prerender = false`.
// The site is fully prerendered; Cloudflare Workers serves the generated static assets.
adapter: cloudflare({
// Prefer an explicit mode from the calling command so local docs workflows
// stay deterministic. Fall back to the Astro command name for direct
Expand All @@ -30,6 +35,26 @@ export default defineConfig({
prerenderEnvironment: 'node',
}),
site: process.env.SITE_URL ?? 'https://bub.build',
fonts: [
{
provider: fontProviders.fontsource(),
name: 'Outfit',
cssVariable: '--font-outfit',
weights: ['100 900'],
styles: ['normal'],
subsets: ['latin', 'latin-ext'],
fallbacks: ['system-ui', 'sans-serif'],
},
{
provider: fontProviders.fontsource(),
name: 'JetBrains Mono',
cssVariable: '--font-jetbrains-mono',
weights: ['100 800'],
styles: ['normal'],
subsets: ['latin', 'latin-ext'],
fallbacks: ['ui-monospace', 'monospace'],
},
],
env: {
schema: {
SITE_URL: envField.string({
Expand Down Expand Up @@ -102,6 +127,9 @@ export default defineConfig({
dark: './src/assets/bub-logo-dark.png',
alt: 'Bub',
},
components: {
Head: './src/components/StarlightHead.astro',
},
// Use the resolved file URL so Vite's module graph reliably
// includes global.css on every Starlight docs page in dev mode.
// (Astro scopes CSS per-page from the import graph; with a
Expand Down Expand Up @@ -140,22 +168,32 @@ export default defineConfig({
customSets: [
{
label: 'Core SDK',
description: 'Embed bub.core.Agent, tools, events, Tape memory, and HTTP services in Python.',
paths: ['docs/getting-started', 'docs/getting-started/**', 'docs/concepts/**', 'docs/sdk', 'docs/sdk/**'],
description:
'Embed bub.core.Agent, tools, events, Tape memory, and HTTP services in Python.',
paths: [
'docs/getting-started',
'docs/getting-started/**',
'docs/concepts/**',
'docs/sdk',
'docs/sdk/**',
],
},
{
label: 'Bub App',
description: 'Run and extend the Bub CLI, gateway, tools, skills, subagents, plugins, and deployment.',
description:
'Run and extend the Bub CLI, gateway, tools, skills, subagents, plugins, and deployment.',
paths: ['docs/getting-started', 'docs/getting-started/**', 'docs/app/**'],
},
{
label: 'Integrations',
description: 'Reuse the Bub app or integrate MCP, Agent Plugins, ACP, AG-UI, local models, storage, and observability.',
description:
'Reuse the Bub app or integrate MCP, Agent Plugins, ACP, AG-UI, local models, storage, and observability.',
paths: ['docs/integrations/**'],
},
{
label: 'Reference',
description: 'CLI commands, settings, built-in tools, Python API, and plugin hooks reference.',
description:
'CLI commands, settings, built-in tools, Python API, and plugin hooks reference.',
paths: ['docs/reference/**'],
},
],
Expand All @@ -177,7 +215,11 @@ export default defineConfig({
{
label: 'Get started',
translations: { 'zh-CN': '开始' },
items: ['docs/getting-started', 'docs/getting-started/install', 'docs/getting-started/quickstart'],
items: [
'docs/getting-started',
'docs/getting-started/install',
'docs/getting-started/quickstart',
],
},
{
label: 'Concepts',
Expand Down Expand Up @@ -219,10 +261,7 @@ export default defineConfig({
label: 'Distribute and deploy',
translations: { 'zh-CN': '分发与部署' },
collapsed: false,
items: [
'docs/app/distribution',
'docs/app/deploy',
],
items: ['docs/app/distribution', 'docs/app/deploy'],
},
],
},
Expand Down
25 changes: 0 additions & 25 deletions website/components.json

This file was deleted.

42 changes: 21 additions & 21 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@
"node": "^22.19.0 || >=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",
"preview": "wrangler dev"
"preview": "wrangler dev",
"check": "astro check",
"fmt": "oxfmt",
"fmt:check": "oxfmt --check"
},
"dependencies": {
"@astrojs/cloudflare": "^14.3.4",
"@astrojs/markdown-satteri": "^0.4.3",
"@astrojs/starlight": "^0.42.6",
"@astrojs/cloudflare": "^14.4.9",
"@astrojs/markdown-satteri": "^0.4.10",
"@astrojs/starlight": "^0.43.2",
"@astrojs/starlight-tailwind": "^5.0.0",
"@expressive-code/plugin-collapsible-sections": "^0.44.4",
"@expressive-code/plugin-line-numbers": "^0.44.4",
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@fontsource-variable/outfit": "^5.3.0",
"@fontsource/noto-sans-sc": "^5.3.1",
"@fontsource/outfit": "^5.3.0",
"@tailwindcss/vite": "^4.3.3",
"astro": "^7.4.7",
"clsx": "^2.1.1",
"motion": "^14.1.0",
"pele": "1.6.0",
"satori": "^0.47.1",
"@tailwindcss/vite": "^4.3.5",
"astro": "^7.4.13",
"motion": "^14.14.0",
"pele": "^1.13.0",
"satori": "^0.63.2",
"sharp": "^0.35.5",
"starlight-llms-txt": "^0.12.0",
"starlight-page-actions": "^0.7.1",
"tailwind-merge": "^3.7.0"
"starlight-page-actions": "^0.7.1"
},
"devDependencies": {
"@lucide/astro": "^1.55.0",
"satteri": "^0.10.5",
"tailwindcss": "^4.3.3",
"wrangler": "^4.149.0"
"@astrojs/check": "^0.9.12",
"@astrojs/compiler-rs": "^0.5.3",
"@lucide/astro": "^1.83.0",
"oxfmt": "^0.80.0",
"satteri": "^0.11.7",
"tailwindcss": "^4.3.5",
"typescript": "^6.0.3",
"wrangler": "~4.168.0"
}
}
Loading
Loading