mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-29 20:05:25 +08:00
test: share zh-only article routes
Co-authored-by: wangcham <[email protected]>
This commit is contained in:
co-authored by
wangcham
parent
d943dcef73
commit
b3a65adfcc
@@ -0,0 +1,5 @@
|
||||
export const zhOnlyArticleRoutes = [
|
||||
"articles/langbot-telegram-sandbox-agent",
|
||||
"articles/langbot-wechat-official-account",
|
||||
"articles/langbot-wecom-customer-service-knowledge-base",
|
||||
];
|
||||
@@ -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: [],
|
||||
};
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user