diff --git a/website/src/components/ui/ThemeToggle.astro b/website/src/components/ui/ThemeToggle.astro
index 3208b835..b6a7e685 100644
--- a/website/src/components/ui/ThemeToggle.astro
+++ b/website/src/components/ui/ThemeToggle.astro
@@ -80,10 +80,7 @@ import Icon from '@/components/ui/Icon.astro';
transition.ready.then(() => {
document.documentElement.animate(
{
- clipPath: [
- `circle(0px at ${cx}px ${cy}px)`,
- `circle(${maxR}px at ${cx}px ${cy}px)`,
- ],
+ clipPath: [`circle(0px at ${cx}px ${cy}px)`, `circle(${maxR}px at ${cx}px ${cy}px)`],
},
{
duration: 420,
diff --git a/website/src/content.config.ts b/website/src/content.config.ts
index e2fc1687..dedae433 100644
--- a/website/src/content.config.ts
+++ b/website/src/content.config.ts
@@ -30,9 +30,92 @@ const userwall = defineCollection({
}),
});
+const github = defineCollection({
+ loader: async () => {
+ const contributorLimit = 15;
+ const apiBase = 'https://api.github.com';
+ const headers: Record = {
+ Accept: 'application/vnd.github+json',
+ 'X-GitHub-Api-Version': '2022-11-28',
+ ...(process.env.GITHUB_TOKEN ? { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {}),
+ };
+
+ let stars = 0;
+ let contributors: Array<{
+ login: string;
+ avatar_url: string;
+ html_url: string;
+ contributions: number;
+ type: string;
+ }> = [];
+
+ try {
+ const [repoRes, contribRes] = await Promise.allSettled([
+ fetch(`${apiBase}/repos/bubbuild/bub`, { headers, signal: AbortSignal.timeout(5_000) }),
+ fetch(
+ `${apiBase}/repos/bubbuild/bub/contributors?per_page=${contributorLimit + 10}&anon=false`,
+ { headers, signal: AbortSignal.timeout(5_000) },
+ ),
+ ]);
+
+ if (repoRes.status === 'fulfilled' && repoRes.value.ok) {
+ const data = (await repoRes.value.json()) as { stargazers_count?: number };
+ stars = data.stargazers_count ?? 0;
+ }
+
+ if (contribRes.status === 'fulfilled' && contribRes.value.ok) {
+ const data = (await contribRes.value.json()) as Array<{
+ login: string;
+ avatar_url: string;
+ html_url: string;
+ contributions: number;
+ type: string;
+ }>;
+ if (Array.isArray(data)) {
+ contributors = data
+ .filter((contributor) => contributor.type === 'User')
+ .slice(0, contributorLimit)
+ .map((contributor) => ({
+ login: contributor.login,
+ avatar_url: contributor.avatar_url,
+ html_url: contributor.html_url,
+ contributions: contributor.contributions,
+ type: contributor.type,
+ }));
+ }
+ }
+ } catch {
+ // Fall back to empty stats when offline or rate-limited.
+ }
+
+ const starsFormatted =
+ stars <= 0
+ ? undefined
+ : stars >= 1_000
+ ? `${(stars / 1_000).toFixed(1).replace(/\.0$/, '')}k`
+ : String(stars);
+
+ return [{ id: 'stats', stars, starsFormatted, contributors }];
+ },
+ schema: z.object({
+ stars: z.number(),
+ starsFormatted: z.string().optional(),
+ contributors: z.array(
+ z.object({
+ login: z.string(),
+ avatar_url: z.string(),
+ html_url: z.string(),
+ contributions: z.number(),
+ type: z.string(),
+ }),
+ ),
+ }),
+});
+
export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }),
+ github,
posts,
userwall,
};
diff --git a/website/src/data/landing-page.ts b/website/src/data/landing-page.ts
index c1a6a143..379f325c 100644
--- a/website/src/data/landing-page.ts
+++ b/website/src/data/landing-page.ts
@@ -94,7 +94,8 @@ const landingPageData: Record = {
hero: {
badge: 'Composable · Tape-driven · Channel-agnostic',
title: 'Bub is a tiny agent runtime, composable with plugins.',
- description: 'Start with a working agent. Use plugins to change how it thinks, remembers, and connects.',
+ description:
+ 'Start with a working agent. Use plugins to change how it thinks, remembers, and connects.',
primaryHref: '#get-started',
primaryLabel: 'Get Started',
secondaryHref: '/docs/getting-started/',
@@ -113,7 +114,8 @@ const landingPageData: Record = {
},
{
label: 'Windows',
- command: 'powershell -ExecutionPolicy ByPass -c "irm https://bub.build/install.ps1 | iex"',
+ command:
+ 'powershell -ExecutionPolicy ByPass -c "irm https://bub.build/install.ps1 | iex"',
},
],
},
@@ -121,7 +123,8 @@ const landingPageData: Record = {
features: {
eyebrow: 'Features',
heading: 'Every decision has a reason.',
- subheading: 'Bub was designed for real multi-agent collaboration from day one — not retrofitted for it.',
+ subheading:
+ 'Bub was designed for real multi-agent collaboration from day one — not retrofitted for it.',
features: [
{
icon: 'webhook',
@@ -169,7 +172,8 @@ const landingPageData: Record = {
{
icon: 'wrench',
title: 'Define your own tools',
- description: 'Use Python functions to bring your own logic and extend what the Agent can do.',
+ description:
+ 'Use Python functions to bring your own logic and extend what the Agent can do.',
},
{
icon: 'activity',
@@ -239,7 +243,8 @@ const landingPageData: Record = {
},
{
label: 'Windows',
- command: 'powershell -ExecutionPolicy ByPass -c "irm https://bub.build/install.ps1 | iex"',
+ command:
+ 'powershell -ExecutionPolicy ByPass -c "irm https://bub.build/install.ps1 | iex"',
},
],
},
@@ -312,7 +317,10 @@ const landingPageData: Record = {
hookIntro: {
eyebrow: '架构',
heading: '处处都是 Hooks。',
- description: ['Bub 中每个阶段都是一个可插拔的 hook。', '通过注册你自己的 hook 覆盖任意阶段。无需 fork。'],
+ description: [
+ 'Bub 中每个阶段都是一个可插拔的 hook。',
+ '通过注册你自己的 hook 覆盖任意阶段。无需 fork。',
+ ],
hookStages: [
{ name: 'resolve_session', note: '路由到正确的会话' },
{ name: 'load_state', note: '从 tape 重建上下文' },
diff --git a/website/src/data/userwall.yml b/website/src/data/userwall.yml
index 2da3c5ff..3a864ec6 100644
--- a/website/src/data/userwall.yml
+++ b/website/src/data/userwall.yml
@@ -1,79 +1,79 @@
-- id: "001"
- name: "PsiACE"
- handle: "@repsiace"
- platform: "x"
- github: "PsiACE"
- text: "使用 bub 作为一个 build block 构建你自己的 agent 产品、服务你的业务,而不是学习复杂的概念然后无从下手。"
- ref: "https://x.com/repsiace/status/2041707245621407984"
+- id: '001'
+ name: 'PsiACE'
+ handle: '@repsiace'
+ platform: 'x'
+ github: 'PsiACE'
+ text: '使用 bub 作为一个 build block 构建你自己的 agent 产品、服务你的业务,而不是学习复杂的概念然后无从下手。'
+ ref: 'https://x.com/repsiace/status/2041707245621407984'
-- id: "002"
- name: "退役星灵艺术鉴赏家"
- handle: "@scnace"
- github: "scbizu"
- platform: "x"
- text: "难道说我在既有 Tape as a Service 的情况下,只要100行代码,就能让我的 agent 接入 bub ,然后让 IM 群聊复用现有的数据吗 ?!"
- ref: "https://x.com/scnace/status/2042562033573609756"
+- id: '002'
+ name: '退役星灵艺术鉴赏家'
+ handle: '@scnace'
+ github: 'scbizu'
+ platform: 'x'
+ text: '难道说我在既有 Tape as a Service 的情况下,只要100行代码,就能让我的 agent 接入 bub ,然后让 IM 群聊复用现有的数据吗 ?!'
+ ref: 'https://x.com/scnace/status/2042562033573609756'
-- id: "003"
- name: "Gezi"
- handle: "@Gezi_lzq"
- platform: "x"
- github: "Gezi-lzq"
- text: "llm本身无状态,如何进行上下文装填,如何进行handoff,如何观测,这方面tape都提供很好的抽象。bub提供的极开放的hook能力,也是给足了自定义的能力。"
- ref: "https://x.com/Gezi_lzq/status/2043357593243169266"
+- id: '003'
+ name: 'Gezi'
+ handle: '@Gezi_lzq'
+ platform: 'x'
+ github: 'Gezi-lzq'
+ text: 'llm本身无状态,如何进行上下文装填,如何进行handoff,如何观测,这方面tape都提供很好的抽象。bub提供的极开放的hook能力,也是给足了自定义的能力。'
+ ref: 'https://x.com/Gezi_lzq/status/2043357593243169266'
-- id: "004"
- name: "yihong"
- handle: "@yihong0618"
- platform: "x"
- github: "yihong0618"
- text: "再强烈推荐一遍 LLM 时代难得的这么优雅的代码了"
- ref: "https://x.com/yihong0618/status/2031920115504357394"
+- id: '004'
+ name: 'yihong'
+ handle: '@yihong0618'
+ platform: 'x'
+ github: 'yihong0618'
+ text: '再强烈推荐一遍 LLM 时代难得的这么优雅的代码了'
+ ref: 'https://x.com/yihong0618/status/2031920115504357394'
-- id: "005"
- name: "Qiping Pan"
- handle: "@ppppqp"
- platform: "github"
- github: "ppppqp"
+- id: '005'
+ name: 'Qiping Pan'
+ handle: '@ppppqp'
+ platform: 'github'
+ github: 'ppppqp'
text: 'Bub is another general purpose agent (similar to openclaw). It implements an interesting memory management strategy using "tape". Tape is initially created for multi-team work.'
- ref: "https://ppppqp.github.io/blog/2026-03-16-bub/"
+ ref: 'https://ppppqp.github.io/blog/2026-03-16-bub/'
-- id: "006"
- name: "Yisheng Gong"
- handle: "@gongyisheng"
- platform: "github"
- github: "gongyisheng"
+- id: '006'
+ name: 'Yisheng Gong'
+ handle: '@gongyisheng'
+ platform: 'github'
+ github: 'gongyisheng'
text: "One genuine advantage: this (Tape) makes subagent history searchable — instead of losing a subagent's full exploration when it returns a summary, the tape preserves everything and lets the parent agent retrieve details later."
- ref: "https://blog.yellowday.day/posts/context_engineering_from_the_inside_out/"
+ ref: 'https://blog.yellowday.day/posts/context_engineering_from_the_inside_out/'
-- id: "007"
- name: "earayu"
- handle: "@earayu"
- platform: "x"
- github: "earayu"
- text: "我一直想要有一个类似于 Cloud Code 一样的通用 Agent 框架,但我一直有点懒得自己开始去做这件事情。然后看到了 bub,感觉完美符合了心中所想的一个 Agent 框架。"
- ref: "https://x.com/earayu/status/2034510426235601168"
+- id: '007'
+ name: 'earayu'
+ handle: '@earayu'
+ platform: 'x'
+ github: 'earayu'
+ text: '我一直想要有一个类似于 Cloud Code 一样的通用 Agent 框架,但我一直有点懒得自己开始去做这件事情。然后看到了 bub,感觉完美符合了心中所想的一个 Agent 框架。'
+ ref: 'https://x.com/earayu/status/2034510426235601168'
-- id: "008"
- name: "Ruter Lü"
- handle: "@ruterlv"
- platform: "x"
- github: "nicognaW"
- text: "给 @bubdotbuild 加上了企业微信的 Channel,现在上班摸鱼有新搭子了😉"
- ref: "https://x.com/ruterlv/status/2042132887517196588"
+- id: '008'
+ name: 'Ruter Lü'
+ handle: '@ruterlv'
+ platform: 'x'
+ github: 'nicognaW'
+ text: '给 @bubdotbuild 加上了企业微信的 Channel,现在上班摸鱼有新搭子了😉'
+ ref: 'https://x.com/ruterlv/status/2042132887517196588'
-- id: "009"
- name: "Frost Ming"
- handle: "@frostming90"
- platform: "x"
- github: "frostming"
- text: "bub 是我们在超级全家桶和纯 vibe 定制中间寻找的一个解决方案"
- ref: "https://x.com/frostming90/status/2041781771872911713"
+- id: '009'
+ name: 'Frost Ming'
+ handle: '@frostming90'
+ platform: 'x'
+ github: 'frostming'
+ text: 'bub 是我们在超级全家桶和纯 vibe 定制中间寻找的一个解决方案'
+ ref: 'https://x.com/frostming90/status/2041781771872911713'
-- id: "010"
- name: "卡比卡比"
- handle: "@jakevin7"
- platform: "x"
- github: "jackwener"
- text: "bub是属于短小精悍,里面有很多思考精神,值得学习"
- ref: "https://x.com/jakevin7/status/2027086038997635164"
+- id: '010'
+ name: '卡比卡比'
+ handle: '@jakevin7'
+ platform: 'x'
+ github: 'jackwener'
+ text: 'bub是属于短小精悍,里面有很多思考精神,值得学习'
+ ref: 'https://x.com/jakevin7/status/2027086038997635164'
diff --git a/website/src/i18n/ui.ts b/website/src/i18n/ui.ts
index df742532..7eb9c920 100644
--- a/website/src/i18n/ui.ts
+++ b/website/src/i18n/ui.ts
@@ -45,7 +45,8 @@ export const ui = {
'zh-cn': {
// Site meta
'site.title': 'Bub | 轻量的 Agent 运行时,以插件自由组合',
- 'site.description': 'Bub 是轻量的 Agent 运行时,以插件自由组合。开箱即用,再按需定制模型执行、记忆和消息渠道。',
+ 'site.description':
+ 'Bub 是轻量的 Agent 运行时,以插件自由组合。开箱即用,再按需定制模型执行、记忆和消息渠道。',
// Nav
'nav.docs': '文档',
diff --git a/website/src/integrations/pele.mjs b/website/src/integrations/pele.mjs
index e1fdae15..5bec4851 100644
--- a/website/src/integrations/pele.mjs
+++ b/website/src/integrations/pele.mjs
@@ -3,9 +3,17 @@ import { isSatteriProcessor, satteri } from '@astrojs/markdown-satteri';
import { render } from 'pele';
function escapeAttribute(value) {
- return value.replace(/[&<>"']/g, (char) => ({
- '&': '&', '<': '<', '>': '>', '"': '"', "'": ''',
- })[char]);
+ return value.replace(
+ /[&<>"']/g,
+ (char) =>
+ ({
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ })[char],
+ );
}
/** @type {import('satteri').MdastPluginDefinition} */
@@ -17,7 +25,8 @@ export const pelePlugin = {
const id = createHash('sha256')
.update(`${context.fileURL}:${JSON.stringify(node.position)}:${node.value}`)
- .digest('hex').slice(0, 12);
+ .digest('hex')
+ .slice(0, 12);
// Fail the build on invalid diagrams, and keep an SVG visible without JavaScript.
//
// Pele re-renders against the container width and flips `flowchart LR` to a
@@ -27,8 +36,8 @@ export const pelePlugin = {
// below scroll horizontally instead.
const { svg } = render(node.value, {
idPrefix: `pele-${id}`,
- fontFamily: 'Outfit Variable, sans-serif',
- fontFamilyMono: 'JetBrains Mono Variable, monospace',
+ fontFamily: 'Outfit, sans-serif',
+ fontFamilyMono: 'JetBrains Mono, monospace',
directionBreakpoint: 1,
});
return {
diff --git a/website/src/layouts/BaseLayout.astro b/website/src/layouts/BaseLayout.astro
index 553bef68..ac13d7f2 100644
--- a/website/src/layouts/BaseLayout.astro
+++ b/website/src/layouts/BaseLayout.astro
@@ -6,6 +6,7 @@ import NavBar from '@/components/NavBar.astro';
import Icon from '@/components/ui/Icon.astro';
import { getLangFromUrl, getHtmlLang, getNavProps, useTranslations } from '@/i18n/utils';
import { getRepoStats } from '@/lib/github';
+import { Font } from 'astro:assets';
import { SITE_URL } from 'astro:env/client';
interface Props {
@@ -26,7 +27,7 @@ const htmlLang = getHtmlLang(locale);
const t = useTranslations(locale);
const navProps = getNavProps(locale, Astro.url.pathname);
-const { starsFormatted: stars } = getRepoStats();
+const { starsFormatted: stars } = await getRepoStats();
const {
title = t('site.title'),
@@ -56,6 +57,8 @@ const ogImageUrl = new URL(ogImage, siteOrigin).href;
+
+
{title}
@@ -95,7 +98,9 @@ const ogImageUrl = new URL(ogImage, siteOrigin).href;