Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

docs: align site deployment guide with README

tianma-ifb4ba3b0c03b2
diff --git a/README.md b/README.md
index 1d43f593..07a503df 100644
--- a/README.md
+++ b/README.md
@@ -79,12 +79,13 @@ Deploy EdgeEver online:
### Option B: Manual Online Deployment
-Complete setup in 4 simple web steps:
+Complete setup in 5 simple web steps:
-1. **Fork & Enable Actions**: Fork EdgeEver into your personal account, then open the Fork's **Actions** tab and click **I understand my workflows, go ahead and enable them** so the GitHub Actions workflow named **Update deployed EdgeEver** can run automatically, keeping you up to date with the latest **EdgeEver** features and fixes.
-2. **Import into Cloudflare**: Log into the Cloudflare Dashboard, navigate to **Workers & Pages**, and choose to import your Fork repository.
-3. **Bind Resources & Credentials**: Bind the D1 database (`DB`), R2 bucket (`RESOURCES`), set `EDGE_EVER_AUTH_USERNAME` (default `admin`, customizable), and set the Worker Secret `EDGE_EVER_AUTH_PASSWORD` as your admin password.
-4. **Build & Verify**: Start the first build with default settings. Once complete, visit `/api/health` to verify a `200` response before logging in.
+1. **Fork the Repository**: Click **Fork** at the top right of GitHub to fork EdgeEver into your personal account.
+2. **Enable Actions**: Open the Fork's **Actions** tab and click **I understand my workflows, go ahead and enable them** so the GitHub Actions workflow named **Update deployed EdgeEver** can run automatically, keeping you up to date with the latest **EdgeEver** features and fixes.
+3. **Import into Cloudflare**: Log into the Cloudflare Dashboard, navigate to **Workers & Pages**, and choose to import your Fork repository.
+4. **Bind Resources & Credentials**: Bind the D1 database (`DB`), R2 bucket (`RESOURCES`), set `EDGE_EVER_AUTH_USERNAME` (default `admin`, customizable), and set the Worker Secret `EDGE_EVER_AUTH_PASSWORD` as your admin password.
+5. **Build & Verify**: Start the first build with default settings. Once complete, visit `/api/health` to verify a `200` response before logging in.
> 📖 For full step-by-step instructions and configuration details, see the [Online Deployment Guide](docs/deploy-cloudflare-button.md).
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 58ba00df..bf25de20 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -79,12 +79,13 @@ EdgeEver 采用纯 Serverless 架构,完全运行在 Cloudflare 免费配额
### 方案二:手动在线部署
-仅需在网页端完成 4 步极简配置:
+仅需在网页端完成 5 步极简配置:
-1. **Fork 仓库并启用 Actions**:将项目 Fork 到您的个人账户后,进入 Fork 的 **Actions** 标签页,点击 **I understand my workflows, go ahead and enable them**,确保名为 **Update deployed EdgeEver** 的 GitHub Actions 工作流能够自动运行,从而持续获得 **EdgeEver** 最新的产品特性和问题修复。
-2. **导入 Cloudflare**:登录 Cloudflare 控制台,进入 **Workers & Pages**,选择导入该 Fork 仓库。
-3. **绑定资源与登录凭据**:绑定 D1 数据库(`DB`)、R2 存储桶(`RESOURCES`),设置 `EDGE_EVER_AUTH_USERNAME`(默认为 `admin`,可自定义),并添加 Worker Secret `EDGE_EVER_AUTH_PASSWORD` 作为管理员登录密码。
-4. **启动构建与验证**:使用默认构建配置启动首次构建,部署完成后访问 `/api/health` 确认返回 `200` 即可开始使用。
+1. **Fork 仓库**:在 GitHub 点击右上角 **Fork**,将项目 Fork 到您的个人账户下。
+2. **启用 Actions**:进入 Fork 的 **Actions** 标签页,点击 **I understand my workflows, go ahead and enable them**,确保名为 **Update deployed EdgeEver** 的 GitHub Actions 工作流能够自动运行,从而持续获得 **EdgeEver** 最新的产品特性和问题修复。
+3. **导入 Cloudflare**:登录 Cloudflare 控制台,进入 **Workers & Pages**,选择导入该 Fork 仓库。
+4. **绑定资源与登录凭据**:绑定 D1 数据库(`DB`)、R2 存储桶(`RESOURCES`),设置 `EDGE_EVER_AUTH_USERNAME`(默认为 `admin`,可自定义),并添加 Worker Secret `EDGE_EVER_AUTH_PASSWORD` 作为管理员登录密码。
+5. **启动构建与验证**:使用默认构建配置启动首次构建,部署完成后访问 `/api/health` 确认返回 `200` 即可开始使用。
> 📖 包含具体参数与构建命令的详细步骤,请查看 [在线部署完整文档](docs/deploy-cloudflare-button.zh-CN.md)。
diff --git a/apps/site/src/components/agent-install-tabs.astro b/apps/site/src/components/agent-install-tabs.astro
index afd703e0..5d301536 100644
--- a/apps/site/src/components/agent-install-tabs.astro
+++ b/apps/site/src/components/agent-install-tabs.astro
@@ -1,18 +1,25 @@
---
import { Icon } from "astro-icon/components";
+import { deploymentPrompts, manualDeploymentCopy } from "@/deployment-prompts";
const { locale = "zh-CN" } = Astro.props;
const isEnglish = locale === "en-US";
const copy = isEnglish
? {
- chooseOne: "Choose either option to complete deployment.",
- oneClick: "Option B: Manual online",
- agent: "Option A: AI Agent",
+ architectureIntro:
+ "EdgeEver uses a pure Serverless architecture that runs entirely within Cloudflare's free tiers. No VPS or server rental is required, and there is no need to configure Docker or SSL certificates.",
+ chooseOne: "You can deploy online using either of the following two options:",
+ oneClick: "Option B: Manual Online Deployment",
+ agent: "Option A: Deploy with an AI Agent",
recommended: "Recommended",
- oneClickIntro:
- "Complete setup in 4 simple web steps: Fork EdgeEver, import it into Cloudflare Workers & Pages, configure required resources & secret, then run and verify the first build. See the online deployment guide for details.",
- forkButton: "Fork EdgeEver on GitHub",
+ agentIntro:
+ "Copy this prompt into an AI Agent configured with GitHub and Cloudflare MCP servers, plugins, or other integrations (such as Codex, Claude, Cursor, Antigravity, OpenClaw, Hermes Agent, etc.):",
+ agentGuide: "Detailed requirements: AI Agent Cloudflare Deployment",
+ agentGuideHref:
+ "https://github.com/tianma-if/edgeever/blob/main/docs/agent-deploy-cloudflare.md",
+ oneClickIntro: manualDeploymentCopy["en-US"].intro,
+ manualSteps: manualDeploymentCopy["en-US"].steps,
oneClickGuide: "Open the online deployment guide",
oneClickGuideHref:
"https://github.com/tianma-if/edgeever/blob/main/docs/deploy-cloudflare-button.md",
@@ -21,16 +28,22 @@ const copy = isEnglish
copying: "Copying...",
copied: "Copied",
copyFailed: "Copy failed",
- promptText:
- "Deploy EdgeEver online:\n1. Fork https://github.com/tianma-if/edgeever.\n2. Import the Fork into Cloudflare Workers & Pages.\n3. Configure D1 DB, R2 RESOURCES, the EDGE_EVER_AUTH_PASSWORD Worker Secret, and Workers Builds using docs/agent-deploy-cloudflare.md.\n4. Start the first build, verify the health endpoint and login, then run Update deployed EdgeEver once.",
+ promptText: deploymentPrompts["en-US"],
}
: {
- chooseOne: "以下两种方案任选其一即可完成部署。",
+ architectureIntro:
+ "EdgeEver 采用纯 Serverless 架构,完全运行在 Cloudflare 免费配额内,无需购买服务器/VPS,也无需配置 Docker 或 SSL 证书。",
+ chooseOne: "您可以选择以下两种方式之一在线部署:",
oneClick: "方案二:手动在线部署",
agent: "方案一:AI Agent 一键部署",
recommended: "推荐",
- oneClickIntro: "仅需在网页端完成 4 步极简配置:Fork EdgeEver、导入 Cloudflare Workers & Pages、配置所需资源与密码、启动并验证首次构建。详细操作请查看在线部署文档。",
- forkButton: "在 GitHub Fork EdgeEver",
+ agentIntro:
+ "将下方提示词直接复制发送给已配置 GitHub、Cloudflare MCP/插件或其他可用集成的 AI Agent(如 Codex, Claude, Cursor, Antigravity, OpenClaw, Hermes Agent 等):",
+ agentGuide: "详细约定与要求:AI Agent 在线部署约定",
+ agentGuideHref:
+ "https://github.com/tianma-if/edgeever/blob/main/docs/agent-deploy-cloudflare.zh-CN.md",
+ oneClickIntro: manualDeploymentCopy["zh-CN"].intro,
+ manualSteps: manualDeploymentCopy["zh-CN"].steps,
oneClickGuide: "查看在线部署文档",
oneClickGuideHref:
"https://github.com/tianma-if/edgeever/blob/main/docs/deploy-cloudflare-button.zh-CN.md",
@@ -39,13 +52,15 @@ const copy = isEnglish
copying: "复制中...",
copied: "已复制",
copyFailed: "复制失败",
- promptText:
- "请在线完成 EdgeEver 部署:\n1. Fork https://github.com/tianma-if/edgeever。\n2. 将这个 Fork 导入 Cloudflare Workers & Pages。\n3. 按照 docs/agent-deploy-cloudflare.zh-CN.md 配置 D1 DB、R2 RESOURCES、EDGE_EVER_AUTH_PASSWORD Worker Secret 和 Workers Builds。\n4. 启动首次构建,验证健康检查和登录,然后手动运行一次 Update deployed EdgeEver。",
+ promptText: deploymentPrompts["zh-CN"],
};
---
<section class="not-prose relative left-1/2 my-10 w-[min(92vw,960px)] -translate-x-1/2" data-agent-install-tabs>
- <p class="mb-5 text-center text-base sm:text-lg font-bold text-slate-800">{copy.chooseOne}</p>
+ <div class="mx-auto mb-5 max-w-3xl space-y-3 text-center text-sm leading-relaxed text-slate-600 sm:text-base">
+ <p>{copy.architectureIntro}</p>
+ <p class="font-bold text-slate-800">{copy.chooseOne}</p>
+ </div>
<!-- Segmented Control Tab Header (Radix / Shadcn Segmented Control Pill Style) -->
<div class="mx-auto max-w-lg p-1 rounded-2xl bg-slate-200/80 border border-slate-300/60 grid grid-cols-2 gap-1 text-xs sm:text-sm font-semibold select-none shadow-2xs">
@@ -68,24 +83,20 @@ const copy = isEnglish
<div class="mt-6 overflow-hidden rounded-[28px] bg-slate-100/90 px-4 py-6 sm:px-10 md:px-14 sm:py-8 border border-slate-200/60 shadow-xs">
<div class="agent-install-panel hidden" data-tab-panel="one-click">
- <div class="mx-auto max-w-3xl text-center text-xs sm:text-sm md:text-base leading-loose text-slate-600 font-sans">
- {isEnglish ? (
- <p class="leading-relaxed">
- Complete setup in 4 simple web steps: Fork{" "}
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs">EdgeEver</span>
- , import it into{" "}
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs">Cloudflare Workers & Pages</span>
- , configure required resources & secret, then run and verify the first build.
- </p>
- ) : (
- <p class="leading-loose">
- 仅需在网页端完成 4 步极简配置:Fork{" "}
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs mx-0.5">EdgeEver</span>
- 、导入{" "}
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs mx-0.5">Cloudflare Workers & Pages</span>
- 、配置所需资源与密码、启动并验证首次构建。详细操作请查看在线部署文档。
- </p>
- )}
+ <div class="mx-auto max-w-3xl text-xs leading-relaxed text-slate-600 sm:text-sm md:text-base">
+ <p class="text-center font-semibold text-slate-800">{copy.oneClickIntro}</p>
+ <ol class="mt-5 space-y-3 text-left">
+ {copy.manualSteps.map((step, index) => (
+ <li class="flex items-start gap-3">
+ <span class="grid h-6 w-6 shrink-0 place-items-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-800">
+ {index + 1}
+ </span>
+ <p>
+ <strong class="text-slate-800">{step.title}</strong>{isEnglish ? ": " : ":"}{step.body}
+ </p>
+ </li>
+ ))}
+ </ol>
</div>
<div class="mt-8 flex justify-center">
@@ -101,25 +112,8 @@ const copy = isEnglish
</div>
<div class="agent-install-panel" data-tab-panel="agent">
- <!-- Top Intro Text (Upper Red Box Optimized Typography) -->
<div class="mx-auto mb-6 max-w-3xl text-center sm:text-left text-xs sm:text-sm md:text-base leading-relaxed text-slate-600 font-sans">
- {isEnglish ? (
- <p class="text-center leading-relaxed">
- Copy the prompt below directly to an AI Agent configured with{" "}
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs">GitHub</span>
- {" "}and{" "}
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs">Cloudflare MCP</span>
- {" "}or other available integrations (such as <span class="font-medium text-slate-800">Codex, Claude, Cursor, Antigravity, OpenClaw, Hermes Agent</span>, etc.):
- </p>
- ) : (
- <p class="text-center leading-loose">
- 将下方提示词直接复制发送给已配置{" "}
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs mx-0.5">GitHub</span>
- 、
- <span class="inline-flex items-center font-bold text-slate-800 bg-white border border-slate-200/90 px-2 py-0.5 rounded-md text-xs shadow-2xs mx-0.5">Cloudflare MCP / 插件</span>
- 或其他可用集成的 AI Agent(如 <span class="font-medium text-slate-800">Codex, Claude, Cursor, Antigravity, OpenClaw, Hermes Agent</span> 等):
- </p>
- )}
+ <p class="text-center leading-relaxed">{copy.agentIntro}</p>
</div>
<!-- Pireel-style Premium Terminal Prompt Window -->
@@ -151,32 +145,17 @@ const copy = isEnglish
</button>
</div>
- <!-- Prompt Content Body with Pireel Code Typography & Highlighting -->
- <div class="p-4 sm:p-6 text-slate-200 leading-relaxed font-mono space-y-3 bg-slate-950/95 rounded-b-2xl select-text">
- <p class="text-slate-400 font-semibold text-xs sm:text-sm">
- {isEnglish ? "Please complete EdgeEver deployment online:" : "请在线完成 EdgeEver 部署:"}
- </p>
- <ol class="space-y-2.5 pl-0.5">
- <li class="flex items-start gap-2">
- <span class="text-emerald-400 font-bold shrink-0 font-mono">1.</span>
- <span class="break-all">Fork <a href="https://github.com/tianma-if/edgeever" target="_blank" rel="noopener" class="text-emerald-300 underline underline-offset-4 decoration-emerald-500/40 hover:text-emerald-200">https://github.com/tianma-if/edgeever</a></span>
- </li>
- <li class="flex items-start gap-2">
- <span class="text-emerald-400 font-bold shrink-0 font-mono">2.</span>
- <span>{isEnglish ? "Import the Fork into" : "将这个 Fork 导入"} <code class="text-teal-300 bg-slate-900 px-1.5 py-0.5 rounded border border-slate-800 font-mono">Cloudflare Workers & Pages</code></span>
- </li>
- <li class="flex items-start gap-2">
- <span class="text-emerald-400 font-bold shrink-0 font-mono">3.</span>
- <span class="break-words">{isEnglish ? "Configure following" : "按照"} <code class="text-amber-300/90 bg-slate-900 px-1.5 py-0.5 rounded border border-slate-800 font-mono">{isEnglish ? "docs/agent-deploy-cloudflare.md" : "docs/agent-deploy-cloudflare.zh-CN.md"}</code> {isEnglish ? "for" : "配置"} <code class="text-cyan-300 bg-slate-900 px-1.5 py-0.5 rounded border border-slate-800 font-mono">D1 DB</code>, <code class="text-cyan-300 bg-slate-900 px-1.5 py-0.5 rounded border border-slate-800 font-mono">R2 RESOURCES</code>, <code class="text-cyan-300 bg-slate-900 px-1.5 py-0.5 rounded border border-slate-800 font-mono">EDGE_EVER_AUTH_PASSWORD</code> {isEnglish ? "Worker Secret, and" : "Worker Secret 和"} <code class="text-teal-300 bg-slate-900 px-1.5 py-0.5 rounded border border-slate-800 font-mono">Workers Builds</code></span>
- </li>
- <li class="flex items-start gap-2">
- <span class="text-emerald-400 font-bold shrink-0 font-mono">4.</span>
- <span>{isEnglish ? "Start first build, verify health check & login, then manually run" : "启动首次构建,验证健康检查和登录,然后手动运行一次"} <code class="text-emerald-300 bg-slate-900 px-1.5 py-0.5 rounded border border-slate-800 font-mono">Update deployed EdgeEver</code></span>
- </li>
- </ol>
+ <div class="rounded-b-2xl bg-slate-950/95 p-4 text-slate-200 sm:p-6">
+ <pre class="m-0 whitespace-pre-wrap break-words font-mono text-xs leading-relaxed sm:text-sm">{copy.promptText}</pre>
</div>
</div>
+ <p class="mx-auto mt-4 max-w-3xl text-center text-xs text-slate-600 sm:text-sm">
+ <a class="font-semibold text-brand underline underline-offset-4 hover:text-brand-hover" href={copy.agentGuideHref} target="_blank" rel="noopener">
+ {copy.agentGuide}
+ </a>
+ </p>
+
<!-- Bottom Visa Billing Notice Card (Soft Muted Amber Warning) -->
<div class="mx-auto mt-5 flex max-w-3xl items-start gap-2.5 rounded-xl border border-amber-200/50 bg-amber-50/50 p-3 sm:p-3.5 text-xs leading-relaxed text-amber-900/80 font-sans">
<Icon class="mt-0.5 h-4 w-4 shrink-0 text-amber-600/70" name="bx:bx-credit-card" />
diff --git a/apps/site/src/deployment-prompts.ts b/apps/site/src/deployment-prompts.ts
new file mode 100644
index 00000000..06596049
--- /dev/null
+++ b/apps/site/src/deployment-prompts.ts
@@ -0,0 +1,71 @@
+export const deploymentPrompts = {
+ "en-US": `Deploy EdgeEver online:
+1. Fork https://github.com/tianma-if/edgeever.
+2. Import the Fork into Cloudflare Workers & Pages.
+3. Configure D1, R2, \`EDGE_EVER_AUTH_USERNAME\` (prefilled as \`admin\`, customizable),
+ the \`EDGE_EVER_AUTH_PASSWORD\` Worker Secret, and the production \`main\` build.
+4. Start the first build and verify \`/api/health\`, \`/api/openapi.json\`, and login.
+5. Enable and manually run the GitHub Actions workflow named \`Update deployed EdgeEver\`
+ once so the Fork can automatically receive the latest EdgeEver features and fixes.`,
+ "zh-CN": `请在线完成 EdgeEver 部署:
+1. Fork https://github.com/tianma-if/edgeever。
+2. 将这个 Fork 导入 Cloudflare Workers & Pages。
+3. 配置 D1、R2、\`EDGE_EVER_AUTH_USERNAME\`(预填为 \`admin\`,可自定义)、
+ \`EDGE_EVER_AUTH_PASSWORD\` Worker Secret 和生产环境 \`main\` 构建。
+4. 启动首次构建,验证 \`/api/health\`、\`/api/openapi.json\` 和登录。
+5. 启用并手动运行一次名为 \`Update deployed EdgeEver\` 的 GitHub Actions 工作流,
+ 以便后续自动同步更新,持续获得 EdgeEver 最新的产品特性和问题修复。`,
+} as const;
+
+export const manualDeploymentCopy = {
+ "en-US": {
+ intro: "Complete setup in 5 simple web steps:",
+ steps: [
+ {
+ title: "Fork the Repository",
+ body: "Click Fork at the top right of GitHub to fork EdgeEver into your personal account.",
+ },
+ {
+ title: "Enable Actions",
+ body: "Open the Fork's Actions tab and click I understand my workflows, go ahead and enable them so the GitHub Actions workflow named Update deployed EdgeEver can run automatically, keeping you up to date with the latest EdgeEver features and fixes.",
+ },
+ {
+ title: "Import into Cloudflare",
+ body: "Log into the Cloudflare Dashboard, navigate to Workers & Pages, and choose to import your Fork repository.",
+ },
+ {
+ title: "Bind Resources & Credentials",
+ body: "Bind the D1 database (DB), R2 bucket (RESOURCES), set EDGE_EVER_AUTH_USERNAME (default admin, customizable), and set the Worker Secret EDGE_EVER_AUTH_PASSWORD as your admin password.",
+ },
+ {
+ title: "Build & Verify",
+ body: "Start the first build with default settings. Once complete, visit /api/health to verify a 200 response before logging in.",
+ },
+ ],
+ },
+ "zh-CN": {
+ intro: "仅需在网页端完成 5 步极简配置:",
+ steps: [
+ {
+ title: "Fork 仓库",
+ body: "在 GitHub 点击右上角 Fork,将项目 Fork 到您的个人账户下。",
+ },
+ {
+ title: "启用 Actions",
+ body: "进入 Fork 的 Actions 标签页,点击 I understand my workflows, go ahead and enable them,确保名为 Update deployed EdgeEver 的 GitHub Actions 工作流能够自动运行,从而持续获得 EdgeEver 最新的产品特性和问题修复。",
+ },
+ {
+ title: "导入 Cloudflare",
+ body: "登录 Cloudflare 控制台,进入 Workers & Pages,选择导入该 Fork 仓库。",
+ },
+ {
+ title: "绑定资源与登录凭据",
+ body: "绑定 D1 数据库(DB)、R2 存储桶(RESOURCES),设置 EDGE_EVER_AUTH_USERNAME(默认为 admin,可自定义),并添加 Worker Secret EDGE_EVER_AUTH_PASSWORD 作为管理员登录密码。",
+ },
+ {
+ title: "启动构建与验证",
+ body: "使用默认构建配置启动首次构建,部署完成后访问 /api/health 确认返回 200 即可开始使用。",
+ },
+ ],
+ },
+} as const;
diff --git a/apps/site/src/i18n.ts b/apps/site/src/i18n.ts
index 086e2b7f..13d4e4ff 100644
--- a/apps/site/src/i18n.ts
+++ b/apps/site/src/i18n.ts
@@ -1,3 +1,5 @@
+import { deploymentPrompts } from "./deployment-prompts";
+
export type SiteLocale = "zh-CN" | "en-US";
export const defaultSiteLocale: SiteLocale = "zh-CN";
@@ -65,11 +67,7 @@ export const siteCopy = {
terminalCmd: "帮我在 Cloudflare 部署 EdgeEver:Fork https://github.com/tianma-if/edgeever 并绑定 D1/R2",
terminalSub: "Agent 原生 · 复制 Prompt 粘贴给 Cursor / Claude Code / Antigravity 即可自动部署",
copySuccess: "部署 Prompt 已复制!粘贴给 AI 助手即可部署",
- agentPromptText: `帮我在 Cloudflare 部署 EdgeEver:
-1. Fork https://github.com/tianma-if/edgeever
-2. 导入 Cloudflare Workers & Pages
-3. 绑定 D1 (DB)、R2 (RESOURCES) 并配置 EDGE_EVER_AUTH_PASSWORD 密钥
-4. 启动首次构建并验证 /api/health`,
+ agentPromptText: deploymentPrompts["zh-CN"],
},
bento: {
eyebrow: "WHY EDGEEVER",
@@ -318,11 +316,7 @@ export const siteCopy = {
terminalCmd: "Deploy EdgeEver on Cloudflare: Fork https://github.com/tianma-if/edgeever & bind D1/R2",
terminalSub: "Agent Native · Copy prompt to Cursor / Claude Code / Antigravity to deploy automatically",
copySuccess: "Deployment Prompt copied! Paste into AI Assistant",
- agentPromptText: `Deploy EdgeEver on Cloudflare:
-1. Fork https://github.com/tianma-if/edgeever
-2. Import into Cloudflare Workers & Pages
-3. Bind D1 (DB), R2 (RESOURCES) and set EDGE_EVER_AUTH_PASSWORD secret
-4. Start first build and verify /api/health`,
+ agentPromptText: deploymentPrompts["en-US"],
},
bento: {
eyebrow: "WHY EDGEEVER",
diff --git a/tests/deployment-entrypoints.test.ts b/tests/deployment-entrypoints.test.ts
index 85bc69f6..f14883bd 100644
--- a/tests/deployment-entrypoints.test.ts
+++ b/tests/deployment-entrypoints.test.ts
@@ -9,10 +9,29 @@ import {
} from "node:fs";
import { resolve } from "node:path";
import { tmpdir } from "node:os";
+import {
+ deploymentPrompts,
+ manualDeploymentCopy,
+} from "../apps/site/src/deployment-prompts";
import { decideUpstreamSync } from "../scripts/upstream-sync-plan.mjs";
const repositoryRoot = resolve(import.meta.dir, "..");
const readRepositoryFile = (path: string) => readFileSync(resolve(repositoryRoot, path), "utf8");
+const extractTextPrompt = (document: string, sectionHeading: string) => {
+ const sectionStart = document.indexOf(sectionHeading);
+ if (sectionStart === -1) throw new Error(`Missing deployment section: ${sectionHeading}`);
+ const match = document.slice(sectionStart).match(/```text\n([\s\S]*?)\n```/);
+ if (!match?.[1]) throw new Error(`Missing deployment prompt after: ${sectionHeading}`);
+ return match[1];
+};
+const extractSection = (document: string, sectionHeading: string) => {
+ const sectionStart = document.indexOf(sectionHeading);
+ if (sectionStart === -1) throw new Error(`Missing section: ${sectionHeading}`);
+ const sectionEnd = document.indexOf("\n---", sectionStart);
+ return document.slice(sectionStart, sectionEnd === -1 ? undefined : sectionEnd);
+};
+const normalizeMarkdownCopy = (value: string) =>
+ value.replace(/[`*]/g, "").replace(/\s+/g, " ").trim();
describe("Cloudflare deployment entrypoints", () => {
test("all entrypoints converge on the common deployment pipeline", () => {
@@ -275,6 +294,39 @@ describe("Cloudflare deployment entrypoints", () => {
expect(chineseReadme).toContain("Fork https://github.com/tianma-if/edgeever");
});
+ test("product site deployment prompts mirror the root READMEs", () => {
+ const englishReadme = readRepositoryFile("README.md");
+ const chineseReadme = readRepositoryFile("README.zh-CN.md");
+ const siteDeploymentComponent = readRepositoryFile(
+ "apps/site/src/components/agent-install-tabs.astro",
+ );
+
+ expect(deploymentPrompts["en-US"]).toBe(
+ extractTextPrompt(englishReadme, "### Option A: Deploy with an AI Agent (Recommended)"),
+ );
+ expect(deploymentPrompts["zh-CN"]).toBe(
+ extractTextPrompt(chineseReadme, "### 方案一:AI Agent 一键部署(推荐)"),
+ );
+ expect(siteDeploymentComponent).toContain('deploymentPrompts["en-US"]');
+ expect(siteDeploymentComponent).toContain('deploymentPrompts["zh-CN"]');
+ expect(siteDeploymentComponent).toContain('manualDeploymentCopy["en-US"]');
+ expect(siteDeploymentComponent).toContain('manualDeploymentCopy["zh-CN"]');
+
+ for (const [locale, readme, heading, separator] of [
+ ["en-US", englishReadme, "### Option B: Manual Online Deployment", ": "],
+ ["zh-CN", chineseReadme, "### 方案二:手动在线部署", ":"],
+ ] as const) {
+ const section = normalizeMarkdownCopy(extractSection(readme, heading));
+ const manualCopy = manualDeploymentCopy[locale];
+ expect(section).toContain(manualCopy.intro);
+ manualCopy.steps.forEach((step, index) => {
+ expect(section).toContain(
+ normalizeMarkdownCopy(`${index + 1}. ${step.title}${separator}${step.body}`),
+ );
+ });
+ }
+ });
+
test("AI Agent deployment remains fully online", () => {
const englishAgentDoc = readRepositoryFile("docs/agent-deploy-cloudflare.md");
const chineseAgentDoc = readRepositoryFile("docs/agent-deploy-cloudflare.zh-CN.md");