-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathregion.config.ts
More file actions
63 lines (55 loc) · 1.95 KB
/
Copy pathregion.config.ts
File metadata and controls
63 lines (55 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
export interface RegionSectionExclusion {
/** Glob pattern matching page paths */
page: string
/** Heading texts to exclude — removes heading + content until next same-level heading */
headings: string[]
}
export interface RegionConfig {
/** API base URL for this region */
apiBaseUrl: string
/** Portal gateway base URL for this region */
portalGatewayBaseUrl: string
/** Site hostname for canonical URLs, sitemap, etc. */
siteHostname: string
/** MCP server hostname for this region (used both for build-time tools fetch and runtime URLs shown to users) */
mcpHostname: string
/**
* Page whitelist — only pages matching these glob patterns are included.
* Uses `**` prefix to match across all locale directories (en, zh-CN, zh-HK).
* Pages not matching any pattern are excluded from the build.
*/
includePages: string[]
/** Nav items to exclude — matches against the link path (e.g. '/', '/docs/api', '/sdk') */
excludeNavLinks: string[]
/** In-page section exclusions (applied within whitelisted pages) */
excludeSections: RegionSectionExclusion[]
}
export const regionConfig: Record<string, RegionConfig> = {
cn: {
apiBaseUrl: 'https://openapi.longbridge.cn',
portalGatewayBaseUrl: 'https://mr.lbkrs.com',
siteHostname: 'https://open.longbridge.cn',
mcpHostname: 'https://mcp.longbridge.cn',
excludeNavLinks: ['/', '/docs/api', '/sdk'],
includePages: [
// Only CLI under /docs/
'**/docs/cli.md',
'**/docs/cli/index.md',
'**/docs/cli/install.md',
'**/docs/cli/release-notes.md',
// MCP
'**/docs/mcp.md',
// Agent Auth Code
'**/docs/agent-auth.md',
// AI Skills
'**/skill/**',
],
excludeSections: [
// Example: remove US stock trading sections from getting-started
// {
// page: '**/docs/getting-started.md',
// headings: ['US Stock Trading', '美股交易', '美股交易'],
// },
],
},
}