From 084c02e43a885d5d42a36c39ce9bd78263c23247 Mon Sep 17 00:00:00 2001 From: Ziyang Guo <121015044+RerankerGuo@users.noreply.github.com> Date: Tue, 6 Oct 2026 14:32:09 +0800 Subject: [PATCH] fix(docs): publish OpenClaw and Hermes integration figures (#586) * fix(docs): publish OpenClaw and Hermes integration figures The generated /en/integrations/openclaw, /zh/integrations/openclaw and /en/integrations/hermes pages are built from the plugin READMEs, which reference local figures/. Only the dsh and Studio READMEs had their ./figures/ links rewritten to site paths and their figure directories copied into the build, so every screenshot on those three pages resolved to //integrations/figures/*.png and 404'd. verify-build.mjs only checks links, never sources, so the build stayed green. Mirror the dsh pattern: rewrite the figure links to /figures/openclaw/ and /figures/hermes/, copy both figure directories into public/figures/, add the missing language-cross link for the Hermes page, and cover all of it in the generated-content tests. * ci(docs): watch the new integration figure directories The figures this PR adds under integrations/hermes_agent/figures/ and integrations/openclaw/figures/ were not in either docs workflow's path filter, so a follow-up commit that only touches a PNG would skip the docs build and the broken-reference tests. Add both globs to the pull_request filter in ci-docs.yml and the push filter in deploy-docs.yml, matching how integrations/dsh/figures/** and reme_studio/figures/** are already listed. Requested in review on #586. * test(docs): validate all integration screenshot references --------- Co-authored-by: jinli.yl --- .github/workflows/ci-docs.yml | 2 ++ .github/workflows/deploy-docs.yml | 2 ++ github-pages/scripts/generate-content.mjs | 12 +++++++++++ github-pages/tests/generated-content.test.mjs | 20 +++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index 69b26f53..f4e8f37a 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -14,10 +14,12 @@ on: - 'reme/config/default.yaml' - 'integrations/claude_code/README.md' - 'integrations/hermes_agent/README.md' + - 'integrations/hermes_agent/figures/**' - 'reme_studio/**' - 'integrations/dsh/README*.md' - 'integrations/dsh/figures/**' - 'integrations/openclaw/README*.md' + - 'integrations/openclaw/figures/**' - 'plugins/*/README*.md' - 'benchmark/*/README*.md' - 'benchmark/toolmemory/gitcha.png' diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 521a954e..29323a8e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -9,12 +9,14 @@ on: - "reme/config/default.yaml" - "integrations/claude_code/README.md" - "integrations/hermes_agent/README.md" + - "integrations/hermes_agent/figures/**" - "README.md" - "README_ZH.md" - "reme_studio/**" - "integrations/dsh/README*.md" - "integrations/dsh/figures/**" - "integrations/openclaw/README*.md" + - "integrations/openclaw/figures/**" - "plugins/*/README*.md" - "benchmark/*/README*.md" - "benchmark/toolmemory/gitcha.png" diff --git a/github-pages/scripts/generate-content.mjs b/github-pages/scripts/generate-content.mjs index cd3d0e85..5435be7a 100644 --- a/github-pages/scripts/generate-content.mjs +++ b/github-pages/scripts/generate-content.mjs @@ -60,9 +60,15 @@ const externalDocumentRewrites = { ], "integrations/openclaw/README.md": [ ["(./README_ZH.md)", "(/zh/integrations/openclaw)"], + ["(./figures/", "(/figures/openclaw/"], ], "integrations/openclaw/README_ZH.md": [ ["(./README.md)", "(/en/integrations/openclaw)"], + ["(./figures/", "(/figures/openclaw/"], + ], + "integrations/hermes_agent/README.md": [ + ["(README_ZH.md)", "(/zh/integrations/hermes)"], + ["(figures/", "(/figures/hermes/"], ], "reme_studio/README.md": [ ["(./README_ZH.md)", "(/zh/workspace/studio)"], @@ -235,6 +241,12 @@ for (const [destination, source] of externalDocuments) { await cp(path.join(repoDir, "integrations/dsh/figures"), path.join(outputDir, "public/figures/dsh"), { recursive: true, }); +await cp(path.join(repoDir, "integrations/openclaw/figures"), path.join(outputDir, "public/figures/openclaw"), { + recursive: true, +}); +await cp(path.join(repoDir, "integrations/hermes_agent/figures"), path.join(outputDir, "public/figures/hermes"), { + recursive: true, +}); await cp(path.join(repoDir, "reme_studio/figures"), path.join(outputDir, "public/figures/studio"), { recursive: true, }); diff --git a/github-pages/tests/generated-content.test.mjs b/github-pages/tests/generated-content.test.mjs index 29297c4c..dbdc5978 100644 --- a/github-pages/tests/generated-content.test.mjs +++ b/github-pages/tests/generated-content.test.mjs @@ -89,6 +89,24 @@ test("publishes Studio screenshots with site-safe links", async () => { assert.match(chinese, /\(\/en\/workspace\/studio\)/); }); +test("publishes OpenClaw and Hermes integration figures with site-safe links", async () => { + for (const [page, integration] of [ + ["en/integrations/openclaw.md", "openclaw"], + ["zh/integrations/openclaw.md", "openclaw"], + ["en/integrations/hermes.md", "hermes"], + ]) { + const content = await readFile(path.join(generatedDir, page), "utf8"); + const images = [...content.matchAll(/!\[[^\]]*\]\(([^)]+)\)/g)]; + assert.ok(images.length, `${page}: screenshots must exist`); + for (const [, source] of images) { + assert.ok(source.startsWith(`/figures/${integration}/`), `${page}: ${source}`); + await access(path.join(generatedDir, "public", source.slice(1))); + } + } + const hermesEnglish = await readFile(path.join(generatedDir, "en/integrations/hermes.md"), "utf8"); + assert.match(hermesEnglish, /\(\/zh\/integrations\/hermes\)/); +}); + test("keeps Studio source READMEs portable for package registries", async () => { for (const name of ["README.md", "README_ZH.md"]) { const source = await readFile(path.join(repoDir, "reme_studio", name), "utf8"); @@ -142,9 +160,11 @@ test("tracks every generated input in documentation CI and deployment", async () "reme/config/default.yaml", "integrations/claude_code/README.md", "integrations/hermes_agent/README.md", + "integrations/hermes_agent/figures/**", "integrations/dsh/README*.md", "integrations/dsh/figures/**", "integrations/openclaw/README*.md", + "integrations/openclaw/figures/**", "reme_studio/**", "benchmark/toolmemory/gitcha.png", ];