From b3a65adfccc511671500c30e2caa8ba766cdaca7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 18 Sep 2026 12:11:53 +0000 Subject: [PATCH] test: share zh-only article routes Co-authored-by: wangcham <95991795+wangcham@users.noreply.github.com> --- tests/article-routes.mjs | 5 +++++ tests/blog-articles.test.mjs | 7 ++----- tests/fumapress-static-build.test.mjs | 5 ++--- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 tests/article-routes.mjs diff --git a/tests/article-routes.mjs b/tests/article-routes.mjs new file mode 100644 index 000000000..05057fe79 --- /dev/null +++ b/tests/article-routes.mjs @@ -0,0 +1,5 @@ +export const zhOnlyArticleRoutes = [ + "articles/langbot-telegram-sandbox-agent", + "articles/langbot-wechat-official-account", + "articles/langbot-wecom-customer-service-knowledge-base", +]; diff --git a/tests/blog-articles.test.mjs b/tests/blog-articles.test.mjs index 6f650f6cb..496220ebc 100644 --- a/tests/blog-articles.test.mjs +++ b/tests/blog-articles.test.mjs @@ -3,6 +3,7 @@ import { createHash } from "node:crypto"; import { existsSync, readFileSync, statSync } from "node:fs"; import path from "node:path"; import test from "node:test"; +import { zhOnlyArticleRoutes } from "./article-routes.mjs"; const root = path.resolve(import.meta.dirname, ".."); const docs = JSON.parse(readFileSync(path.join(root, "docs.json"), "utf8")); @@ -14,11 +15,7 @@ const localeConfig = { }; const extraArticlePages = { en: [], - zh: [ - "zh/articles/langbot-telegram-sandbox-agent", - "zh/articles/langbot-wechat-official-account", - "zh/articles/langbot-wecom-customer-service-knowledge-base", - ], + zh: zhOnlyArticleRoutes.map((route) => `zh/${route}`), ja: [], }; diff --git a/tests/fumapress-static-build.test.mjs b/tests/fumapress-static-build.test.mjs index 4558ca102..8bac4a859 100644 --- a/tests/fumapress-static-build.test.mjs +++ b/tests/fumapress-static-build.test.mjs @@ -3,6 +3,7 @@ import { access, readdir, readFile, stat } from "node:fs/promises"; import path from "node:path"; import test from "node:test"; import { collectMdxDocuments } from "../scripts/prepare-fumapress.mjs"; +import { zhOnlyArticleRoutes } from "./article-routes.mjs"; const root = path.resolve(import.meta.dirname, ".."); const publicRoot = path.join(root, "dist/public"); @@ -212,9 +213,7 @@ test("canonical sitemap routes match the legacy Mintlify directory structure", a const locales = ["en", "zh", "ja"]; const hreflangByLocale = { en: "en", zh: "zh-CN", ja: "ja" }; const zhOnlyRoutes = [ - "articles/langbot-telegram-sandbox-agent", - "articles/langbot-wechat-official-account", - "articles/langbot-wecom-customer-service-knowledge-base", + ...zhOnlyArticleRoutes, "develop/adapter/discord/README", "develop/adapter/discord/api_reference", "develop/adapter/discord/design",