Skip to content

Commit 1fec9b4

Browse files
author
hzq
committed
Point Linux visitors to the localized source install steps
Match the desktop downloads to published assets and check that both landing pages link to the generated source instructions.
1 parent 64f5e64 commit 1fec9b4

3 files changed

Lines changed: 30 additions & 44 deletions

File tree

‎site/en/index.html‎

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ <h2 class="display" id="t-install">Pick an install path, run your first task</h2
507507
<div class="install-card">
508508
<div class="install-head">
509509
<h3>Cross-platform desktop app</h3>
510-
<span class="pill">macOS · Windows · Linux</span>
510+
<span class="pill">macOS · Windows</span>
511511
</div>
512512
<p>
513513
Unified Electron sandboxed shell bundling Node.js 24, the web console, dock approval
@@ -524,29 +524,15 @@ <h3>Cross-platform desktop app</h3>
524524

525525
<div class="install-card">
526526
<div class="install-head">
527-
<h3>Linux one-liner</h3>
528-
<span class="pill">x64 · arm64 · rootless</span>
527+
<h3>Linux from source</h3>
528+
<span class="pill">Node.js 24.18–26</span>
529529
</div>
530530
<p>
531-
Verifies release SHA256SUMS, bundles the Node runtime, and installs under ~/.local:
531+
Clone and build the CLI, then run the offline sample. No upstream model key is
532+
needed.
532533
</p>
533534
<div class="cmd-box">
534-
<code
535-
>curl -fsSL
536-
https://github.com/jiangxingfan1-coder/Open-Agent-API/releases/latest/download/install.sh
537-
| sh</code
538-
>
539-
<button
540-
type="button"
541-
class="copy-btn copy-mini"
542-
data-copy-btn
543-
data-copy-value="curl -fsSL https://github.com/jiangxingfan1-coder/Open-Agent-API/releases/latest/download/install.sh | sh && oaa quickstart"
544-
data-copy-default="Copy"
545-
data-copy-done="✓"
546-
aria-label="Copy Linux install command"
547-
>
548-
<span data-copy-label>Copy</span>
549-
</button>
535+
<a class="cmd-link" href="../docs/install.html#source">Build from source →</a>
550536
</div>
551537
</div>
552538

@@ -577,10 +563,10 @@ <h3>Docker Compose</h3>
577563

578564
<div class="install-card">
579565
<div class="install-head">
580-
<h3>From source or npm tarball</h3>
566+
<h3>Already built from source?</h3>
581567
<span class="pill">Node.js 24 / 26</span>
582568
</div>
583-
<p>Install the release .tgz globally, or run directly from a repository checkout:</p>
569+
<p>From a built repository checkout, start the local sample:</p>
584570
<div class="cmd-box">
585571
<code>npm run oaa -- quickstart</code>
586572
<button

‎site/index.html‎

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ <h2 class="display" id="t-install">选一种趁手的方式装上,一条命令
495495
<div class="install-card">
496496
<div class="install-head">
497497
<h3>跨平台桌面应用</h3>
498-
<span class="pill">macOS · Windows · Linux</span>
498+
<span class="pill">macOS · Windows</span>
499499
</div>
500500
<p>
501501
统一基于 Electron 安全沙箱外壳构建,内置 Node.js 24
@@ -512,27 +512,12 @@ <h3>跨平台桌面应用</h3>
512512

513513
<div class="install-card">
514514
<div class="install-head">
515-
<h3>Linux 一键安装</h3>
516-
<span class="pill">x64 · arm64 · 免 root</span>
515+
<h3>Linux 源码安装</h3>
516+
<span class="pill">Node.js 24.18–26</span>
517517
</div>
518-
<p>自动核验发布页同批次的 SHA256SUMS,自带独立运行时并安装至 ~/.local:</p>
518+
<p>克隆仓库并构建 CLI,即可运行离线示例,无需上游模型密钥。</p>
519519
<div class="cmd-box">
520-
<code
521-
>curl -fsSL
522-
https://github.com/jiangxingfan1-coder/Open-Agent-API/releases/latest/download/install.sh
523-
| sh</code
524-
>
525-
<button
526-
type="button"
527-
class="copy-btn copy-mini"
528-
data-copy-btn
529-
data-copy-value="curl -fsSL https://github.com/jiangxingfan1-coder/Open-Agent-API/releases/latest/download/install.sh | sh && oaa quickstart"
530-
data-copy-default="复制"
531-
data-copy-done="✓"
532-
aria-label="复制 Linux 安装命令"
533-
>
534-
<span data-copy-label>复制</span>
535-
</button>
520+
<a class="cmd-link" href="docs/zh-CN/install.html#源码">查看源码构建步骤 →</a>
536521
</div>
537522
</div>
538523

@@ -563,10 +548,10 @@ <h3>Docker 容器</h3>
563548

564549
<div class="install-card">
565550
<div class="install-head">
566-
<h3>源码目录与 npm 包</h3>
551+
<h3>已从源码构建?</h3>
567552
<span class="pill">Node.js 24 / 26</span>
568553
</div>
569-
<p>支持从发布页全局安装 .tgz 归档包,或在克隆仓库后一键启动离线快速体验:</p>
554+
<p>在已构建的仓库目录中,运行本地示例:</p>
570555
<div class="cmd-box">
571556
<code>npm run oaa -- quickstart</code>
572557
<button

‎test/docs-site.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,21 @@ const KNOWN_DOC_DEFECTS: string[] = [];
214214
/** Documents that are linked before they exist (the same list as PENDING_NEW_DOCS in test/docs.test.ts). */
215215
const PENDING = ['docs/stability.md', 'docs/zh-CN/stability.md'];
216216

217+
test('docs-site: both landing pages link to the localized source build steps', async () => {
218+
for (const [landing, href] of [
219+
['index.html', 'docs/zh-CN/install.html#源码'],
220+
['en/index.html', '../docs/install.html#source'],
221+
] as const) {
222+
const html = await readFile(path.join('site', landing), 'utf8');
223+
const install = html.match(/<section id="install"[^>]*>([\s\S]*?)<\/section>/)?.[1];
224+
assert.ok(install?.includes(`href="${href}"`), `${landing} lacks the source install link`);
225+
const target = new URL(href, 'https://example.invalid/' + landing);
226+
const fragment = decodeURIComponent(target.hash.slice(1));
227+
const page = built.files.get(target.pathname.slice(1)) as string | undefined;
228+
assert.ok(page?.includes(`id="${fragment}"`), `${landing} links to missing ${href}`);
229+
}
230+
});
231+
217232
test('docs-site: every document of both languages and the cookbook becomes a page', async () => {
218233
const { readdir } = await import('node:fs/promises');
219234
for (const [dir, lang] of [

0 commit comments

Comments
 (0)