diff --git a/docusaurus.config.js b/docusaurus.config.js index 391b6bbe7f..ffc25865f6 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -31,6 +31,10 @@ module.exports = { organizationName: 'apache', projectName: 'eventmesh', themeConfig: { + colorMode: { + defaultMode: 'dark', + respectPrefersColorScheme: false, + }, algolia: { appId: 'D5N4C17BGA', apiKey: 'b88c3c5f941724113717b2c8456d0422', @@ -252,4 +256,14 @@ module.exports = { }, ], ], + stylesheets: [ + '/css/docusaurus-override.css', + '/css/site-redesign.css', + ], + scripts: [ + { src: '/js/theme-init.js' }, + { src: '/js/eventmesh-theme.js', defer: true }, + { src: '/js/eventmesh-internal.js', defer: true }, + { src: '/js/site-redesign.js', defer: true }, + ], }; diff --git a/i18n/zh/docusaurus-plugin-content-pages/index.tsx b/i18n/zh/docusaurus-plugin-content-pages/index.tsx new file mode 100644 index 0000000000..5d4f95f556 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-pages/index.tsx @@ -0,0 +1,491 @@ +import React from 'react'; +import Head from '@docusaurus/Head'; +import {useEffect} from 'react'; + +const publishCode = `# 通过 HTTP 发布 CloudEvent +curl -X POST \ + http://127.0.0.1:10105/eventmesh/publish/TEST-TOPIC-HTTP-ASYNC \ + -H "Content-Type: application/json" \ + -d '{ + "name": "eventmesh", + "pass": "password" + }' + +# 响应: +{ + "success": true, + "retCode": 0 +} 🚀 事件已发布!`; + +const subscribeCode = `# 通过 HTTP Webhook 订阅主题 +curl -X POST \ + http://127.0.0.1:10105/eventmesh/subscribe/local \ + -H "Content-Type: application/json" \ + -d '{ + "url": "http://127.0.0.1:8088/sub/test", + "consumerGroup": "TEST-GROUP", + "topic": [{"mode":"CLUSTERING","topic":"TEST-TOPIC-HTTP-ASYNC","type":"ASYNC"}] + }' + +# 事件以 CloudEvents 格式推送到你的 Webhook 📨`; + +export default function Home() { + useEffect(() => { + document.body.classList.add('is-homepage'); + return () => document.body.classList.remove('is-homepage'); + }, []); + + return ( +
+ + Apache EventMesh — 云原生时代的事件驱动基础设施 + + + + + + + {/* ===== Navigation ===== */} + + + {/* Mobile Menu */} +
+ 文档 + 特性 + 架构 + Agent Mesh + 下载 + 社区 + 博客 + English +
+ + {/* ===== Hero ===== */} +
+ +
+
+ +
+
+ + v1.12.0 已发布 — 新增 A2A 协议支持 +
+ +

+ 面向 Agent 时代的
+ 事件驱动基础设施 +

+ +

+ Apache EventMesh 是云原生事件中间件,通过统一事件总线连接服务、系统和 AI Agent。 + 无服务器、可扩展、协议无关 — 为下一代分布式应用而生。 +

+ +
+ + 快速开始 + + + + + 在 GitHub 上查看 + +
+ +
+
+
+
+
+ bash — eventmesh-quickstart +
+
+
+
+
+
+
+
+ +
+
+
+
+ + {/* ===== Stats ===== */} +
+
+
+
+
v1.12.0
+
最新版本
+
+
+
2.1k+
+
GitHub Stars
+
+
+
300+
+
贡献者
+
+
+
20+
+
连接器
+
+
+
+
+ + {/* ===== Features ===== */} +
+
+
+
核心能力
+

构建事件驱动架构
所需的一切

+

+ 从简单的发布/订阅到复杂的事件编排,EventMesh 提供构建弹性、可扩展、 + 解耦分布式系统的全套基础设施。 +

+
+ +
+
+
+ +
+

高吞吐事件处理

+

每秒百万级事件,亚毫秒延迟。支持 RocketMQ、Kafka、AutoMQ 等可插拔事件存储引擎。

+
+ +
+
+ +
+

CloudEvents 原生

+

CNCF CloudEvents 规范一等公民支持。跨所有连接器和协议的标准化事件格式。

+
+ +
+
+ +
+

多协议网关

+

HTTP、gRPC、TCP、WebSocket 协议统一到一个事件网格。无需改码即可协议转换。

+
+ +
+
+ +
+

事件编排

+

基于 Serverless Workflow 的内置事件工作流引擎。用声明式 YAML 定义复杂事件编排。

+
+ +
+
+ +
+

可靠投递保障

+

支持至少一次、最多一次、精确一次投递语义。事件存储内置重试、死信队列和事务支持。

+
+ +
+
+ +
+

安全与治理

+

内置 mTLS、OAuth2 和 RBAC。事件 Schema 注册中心、审计日志和限流,满足生产级安全需求。

+
+
+
+
+ + {/* ===== Architecture ===== */} +
+
+
+
架构设计
+

分层设计
极致灵活

+

+ 四层解耦架构 — 每层可独立扩展和替换。 + 自由组合连接器、协议和事件存储,适配你的基础设施。 +

+
+ +
+ EventMesh 架构图 +
+
+
+ + {/* ===== A2A Agent Mesh ===== */} +
+
+
+
+
v1.12 新特性
+

A2A 协议支持
Agent 消息总线

+

+ EventMesh 正在从传统事件中间件演进为 AI Agent 间通信的统一消息总线, + 基于 A2A(Agent-to-Agent)协议构建。 +

+ +
    +
  • + + + + Agent 发现与路由 — Agent 通过事件网格注册能力并动态发现对等节点 +
  • +
  • + + + + 异步任务委派 — 长时间运行的 Agent 任务,基于回调的事件完成语义 +
  • +
  • + + + + 流式通信 — SSE 和 gRPC streaming 支持实时 Agent 交互 +
  • +
  • + + + + 协议桥接 — 无缝桥接 A2A 与现有 CloudEvents 和遗留消息系统 +
  • +
  • + + + + 可观测性 — OpenTelemetry 原生链路追踪,贯穿整个 Agent 通信链 +
  • +
+ + +
+ +
+
+
🔍
+
研究 Agent
+
数据采集
+
+
+
🪨
+
EventMesh 总线
+
A2A 协议
+
+
+
📊
+
分析 Agent
+
信号处理
+
+
+
+
执行 Agent
+
订单路由
+
+
+
🛡️
+
风控 Agent
+
合规检查
+
+
+
📝
+
报告 Agent
+
摘要生成
+
+
+
🤖
+
LLM Agent
+
推理引擎
+
+
+
+
+
+ + {/* ===== Ecosystem ===== */} +
+
+
+
生态系统
+

连接一切

+

+ 开箱即用的连接器。EventMesh 与你现有的基础设施无缝集成 — + 无需推倒重来。 +

+
+ +
+ EventMesh 生态图 +
+
+
+ + {/* ===== Code Example ===== */} +
+
+
+
+
快速开始
+

一分钟
快速上手

+

+ 用 Docker 部署 EventMesh,发布你的第一个事件并订阅 — + 只需几行代码。无需复杂配置。 +

+ +
+ +
+
+
发布
+
订阅
+
+
+
+              
+
+
+              
+
+
+
+
+ + {/* ===== Community CTA ===== */} +
+
+
+

加入 EventMesh 社区

+

+ Apache EventMesh 是 Apache 软件基金会顶级项目。 + 加入 300+ 贡献者,共建事件驱动基础设施的未来。 +

+
+ 参与贡献 + 在 GitHub 上 Star + 团队介绍 +
+
+
+ + {/* ===== Footer ===== */} + +
+ ); +} diff --git a/inject_override.py b/inject_override.py new file mode 100644 index 0000000000..062f457766 --- /dev/null +++ b/inject_override.py @@ -0,0 +1,140 @@ +#!/usr/bin/env python3 +"""Inject docusaurus-override.css and eventmesh-internal.js into all Docusaurus HTML pages. +Updates cache-busting version parameter to force browser reload. +""" +import os +import re +import sys +from pathlib import Path + +SITE_ROOT = Path(__file__).parent +OLD_CSS_VERSION = '20260704m' +OLD_JS_VERSION = '20260704m' +NEW_VERSION = '20260704n' + +# Files to inject +CSS_FILE = '/assets/css/docusaurus-override.css' +JS_FILE = '/assets/js/eventmesh-internal.js' + +# Theme init script (must be before any Docusaurus JS) +THEME_INIT = '''''' + +css_inject = f'' +js_inject = f'' + +def is_docusaurus_page(content): + """Check if this is a Docusaurus page with navbar.""" + return 'class="navbar' in content or 'navbar__inner' in content + +def process_file(filepath): + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + + if not is_docusaurus_page(content): + return False, "not a docusaurus page" + + modified = False + + # 1. Update CSS link version + # Find old CSS link and replace version + old_css = f'{CSS_FILE}?v={OLD_CSS_VERSION}' + if old_css in content: + content = content.replace(old_css, f'{CSS_FILE}?v={NEW_VERSION}') + modified = True + else: + # CSS link exists but with different/no version — update it + # Find + css_pattern = re.compile( + r'' + ) + match = css_pattern.search(content) + if match: + content = content[:match.start()] + css_inject + content[match.end():] + modified = True + else: + # Inject CSS after the existing styles.4f054d44.css link + styles_match = re.search(r']*>', content) + if styles_match: + insert_pos = styles_match.end() + content = content[:insert_pos] + '\n' + css_inject + content[insert_pos:] + modified = True + + # 2. Update JS script version + old_js = f'{JS_FILE}?v={OLD_JS_VERSION}' + if old_js in content: + content = content.replace(old_js, f'{JS_FILE}?v={NEW_VERSION}') + modified = True + else: + # JS script exists with different/no version + js_pattern = re.compile( + r'' + ) + match = js_pattern.search(content) + if match: + content = content[:match.start()] + js_inject + content[match.end():] + modified = True + else: + # Inject JS before + body_close = content.rfind('') + if body_close > 0: + content = content[:body_close] + js_inject + '\n' + content[body_close:] + modified = True + + # 3. Inject anti-logo-flash inline style right after — absolute first CSS rule. + # This prevents the old Docusaurus logo.png from flashing during SPA navigation, + # before any external stylesheet is parsed. The html prefix + !important give max specificity. + ANTI_FLASH_STYLE = '' + anti_flash_present = 'data-em-anti-flash' in content + if not anti_flash_present: + head_close = content.find('') + if head_close > 0: + insert_pos = head_close + len('') + content = content[:insert_pos] + '\n' + ANTI_FLASH_STYLE + content[insert_pos:] + modified = True + + # 4. Ensure theme init script is before any Docusaurus scripts in + # Check if already has our theme init + theme_init_present = 'localStorage.getItem("eventmesh-theme")' in content + if not theme_init_present: + # Find the Docusaurus theme script that sets dark: + docusaurus_theme = 'data-theme","dark");h.classList.add("dark")' + if docusaurus_theme in content: + # Insert our theme init BEFORE the Docusaurus one + idx = content.find(docusaurus_theme) + # Find the start of this script tag + script_start = content.rfind('