Skip to content

Commit 1f866c4

Browse files
100gleCopilotPsiACE
authored
feat(website): Add brand-new bub website powered by Astro and Starlight (#176)
* wip * feat(website): build landing page sections and migrate docs content Landing page: - Add Features.astro (6 feature cards, responsive 3×2 grid, hover animation) - Add QuickStart.astro (3-step install/configure/run with code blocks) - Add Philosophy.astro (born-in-group-chats storytelling, pull quote, highlights) - Add Footer.astro (brand, nav links, copyright, built-with) - Wire all new sections into pages/index.astro and pages/zh-cn/index.astro - Extend landing-page.ts with full EN and zh-cn i18n copy for all sections - Add section divider rule to global.css Docs migration (from docs/ source of truth): - Migrate docs/architecture.md → concepts/architecture.mdx (EN + zh-cn) - Migrate docs/channels/{index,cli,telegram}.md → guides/{channels,cli,telegram}.mdx - Migrate docs/skills.md → guides/skills.mdx - Migrate docs/deployment.md → guides/deployment.mdx - Split docs/extension-guide.md → extending/{plugins,hooks}.mdx - Migrate blog posts → blog/{socialized-evaluation,bootstrap-milestone}.mdx - Create reference/index.mdx placeholder (EN + zh-cn) - Remove orphaned en/docs/index.mdx and zh-cn/docs/index.mdx - Switch astro.config.mjs sidebar to autogenerate per directory Build: 37 static pages, zero errors Closes #3, #4, #5, #6, #7, #8, #9, #10, #11, #12 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refactor(website): brand-new design with shadcn create * wip * wip * wip * wip * feat: make all landing page components mobile-responsive - Features: hide center logo on <lg, 1col mobile/2col sm/3col lg grid, responsive padding and min-height - NavBar: icons + borders in mobile dropdown, slide-down animation - Hero: full-width CTA buttons on mobile, overflow-x-auto on terminal - HookIntro: hide hook-note text on <md, overflow-hidden on stage container - TapeModel: hide time column on <sm, responsive cell padding, scroll fade indicator - Testimonials: responsive height (320/380/440px) - Footer: vertical stack on mobile, centered, flex-wrap links - Contributors: show 5 avatars on mobile (10 on md+), smaller avatar size Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * wip * wip * wip * refactor(website/i18n): Optimize i18n configuration and route path * feat(website): Set real repository data and enable SSR mode * style(website/hook): Redesign the hook intro illustration and animation * refactor(website/tape): Redesign tape section illustration and animation * improve(website): Optimize website UI/UX - Unified the theme between main site and docs - Unified the theme storage key - fix the i18n route path issue Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * wip * wip * wip * wip * wip * wip * wip * wip * feat(website/i18n): Optimize chinese translation content * og and userwall avatar * feat(website): switch OG fonts to fontsource, add zh-cn index card - Replace Google Fonts API with @fontsource/outfit and @fontsource/noto-sans-sc (.woff files read directly by satori) - Use unicode-range subset matching to load only needed CJK subsets - Give each CJK subset a unique font name to work around satori's deduplication of same-name+weight entries - Add /og/zh-cn/index.png OG card with Chinese site description - Wire locale-specific ogImage through LandingLayout → BaseLayout - Remove wawoff2 dependency (satori supports WOFF natively) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * extract site url environment variable * optimize og and html background * fix the navbar issue * remove duplicated title * fix x icon and ui i18n issue * chore: switch website adapter to cloudflare --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Chojan Shang <psiace@apache.org>
1 parent 57c4afd commit 1f866c4

82 files changed

Lines changed: 12255 additions & 1 deletion

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,4 @@ reference/
146146
# Local legacy backups created during framework migrations
147147
backup/
148148
_version.py
149+
!website/src/lib/

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
exclude: ^.devcontainer/devcontainer.json
1111
- id: pretty-format-json
1212
exclude: ^.devcontainer/devcontainer.json
13-
args: [--autofix, --no-sort-keys]
13+
args: [--autofix, --no-sort-keys, --no-ensure-ascii]
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
1616

website/.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# The canonical site URL (no trailing slash). Used for OG images, canonical links, etc.
2+
SITE_URL=https://bub.build
3+
4+
# To get bub repository real contributors and stars data via GitHub API.
5+
GITHUB_TOKEN=

website/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
.vercel/output
23+
.wrangler/

website/AGENTS.md

Lines changed: 461 additions & 0 deletions
Large diffs are not rendered by default.

website/CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CLAUDE.md
2+
3+
> **All project guidelines live in [`AGENTS.md`](./AGENTS.md). Read that file — it is the single source of truth.**
4+
>
5+
> This file exists only so Claude Code automatically picks up the project context. Do not duplicate content here.

website/astro.config.mjs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// @ts-check
2+
import { fileURLToPath } from 'node:url';
3+
import { defineConfig, envField } from 'astro/config';
4+
import tailwindcss from '@tailwindcss/vite';
5+
import starlight from '@astrojs/starlight';
6+
import cloudflare from '@astrojs/cloudflare';
7+
8+
export default defineConfig({
9+
// SSG by default; landing pages opt-in to SSR via `export const prerender = false`.
10+
adapter: cloudflare({
11+
prerenderEnvironment: 'node',
12+
}),
13+
site: process.env.SITE_URL ?? 'https://bub.build',
14+
env: {
15+
schema: {
16+
SITE_URL: envField.string({
17+
context: 'client',
18+
access: 'public',
19+
default: 'https://bub.build',
20+
optional: true,
21+
url: true,
22+
}),
23+
},
24+
},
25+
vite: {
26+
plugins: [tailwindcss()],
27+
resolve: {
28+
alias: {
29+
'@': fileURLToPath(new URL('./src', import.meta.url)),
30+
},
31+
},
32+
},
33+
integrations: [
34+
starlight({
35+
title: 'Bub',
36+
description: 'A common shape for agents that live alongside people.',
37+
logo: {
38+
light: './src/assets/bub-logo.png',
39+
dark: './src/assets/bub-logo-dark.png',
40+
alt: 'Bub',
41+
},
42+
customCss: ['./src/styles/global.css'],
43+
disable404Route: true,
44+
locales: {
45+
root: {
46+
label: 'English',
47+
lang: 'en',
48+
},
49+
'zh-cn': {
50+
label: '简体中文',
51+
lang: 'zh-CN',
52+
},
53+
},
54+
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/bubbuild/bub' }],
55+
sidebar: [
56+
{
57+
label: 'Getting Started',
58+
translations: { 'zh-CN': '快速开始' },
59+
autogenerate: { directory: 'docs/getting-started' },
60+
},
61+
{
62+
label: 'Concepts',
63+
translations: { 'zh-CN': '概念' },
64+
autogenerate: { directory: 'docs/concepts' },
65+
},
66+
{
67+
label: 'Guides',
68+
translations: { 'zh-CN': '指南' },
69+
autogenerate: { directory: 'docs/guides' },
70+
},
71+
{
72+
label: 'Extending',
73+
translations: { 'zh-CN': '扩展' },
74+
autogenerate: { directory: 'docs/extending' },
75+
},
76+
],
77+
}),
78+
],
79+
});

website/components.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "base-vega",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/styles/global.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"rtl": false,
15+
"aliases": {
16+
"components": "@/components",
17+
"utils": "@/lib/utils",
18+
"ui": "@/components/ui",
19+
"lib": "@/lib",
20+
"hooks": "@/hooks"
21+
},
22+
"menuColor": "default",
23+
"menuAccent": "subtle",
24+
"registries": {}
25+
}

website/package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "website",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"build": "astro build",
8+
"preview": "astro preview"
9+
},
10+
"dependencies": {
11+
"@astrojs/cloudflare": "^13.1.9",
12+
"@astrojs/starlight": "^0.38.3",
13+
"@astrojs/starlight-tailwind": "^5.0.0",
14+
"@fontsource-variable/jetbrains-mono": "^5.2.8",
15+
"@fontsource-variable/outfit": "^5.2.8",
16+
"@fontsource/noto-sans-sc": "^5.2.9",
17+
"@fontsource/outfit": "^5.2.8",
18+
"@tailwindcss/vite": "^4.1.14",
19+
"astro": "^6.0.1",
20+
"astro-expressive-code": "^0.41.7",
21+
"class-variance-authority": "^0.7.1",
22+
"clsx": "^2.1.1",
23+
"motion": "^12.38.0",
24+
"satori": "^0.26.0",
25+
"sharp": "^0.34.2",
26+
"tailwind-merge": "^3.5.0",
27+
"tw-animate-css": "^1.4.0"
28+
},
29+
"devDependencies": {
30+
"@lucide/astro": "^1.8.0",
31+
"react-grab": "^0.1.32",
32+
"tailwindcss": "^4.1.14",
33+
"wrangler": "^4.13.2"
34+
},
35+
"overrides": {
36+
"vite": "^7.3.2"
37+
}
38+
}

0 commit comments

Comments
 (0)