@f5-sales-demo/docs-theme 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/assets/f5-distributed-cloud.svg +1 -0
- package/assets/f5-logo.svg +1 -0
- package/assets/github-avatar.png +0 -0
- package/astro.config.mjs +3 -0
- package/bin/translate.mjs +113 -0
- package/components/Banner.astro +51 -0
- package/components/EditLink.astro +3 -0
- package/components/Footer.astro +47 -0
- package/components/Icon.astro +100 -0
- package/components/LinkCard.astro +110 -0
- package/components/MarkdownContent.astro +7 -0
- package/components/Screenshot.astro +31 -0
- package/components/SiteTitle.astro +56 -0
- package/config.ts +816 -0
- package/fonts/font-face.css +79 -0
- package/fonts/neusaNextProWide-300.woff2 +0 -0
- package/fonts/neusaNextProWide-400.woff2 +0 -0
- package/fonts/neusaNextProWide-400i.woff2 +0 -0
- package/fonts/neusaNextProWide-500.woff2 +0 -0
- package/fonts/neusaNextProWide-700.woff2 +0 -0
- package/fonts/neusaNextProWide-700i.woff2 +0 -0
- package/fonts/proximaNova-400.woff2 +0 -0
- package/fonts/proximaNova-500.woff2 +0 -0
- package/fonts/proximaNova-600.woff2 +0 -0
- package/fonts/proximaNova-700.woff2 +0 -0
- package/index.ts +36 -0
- package/package.json +135 -0
- package/route-middleware.ts +73 -0
- package/src/content.config.ts +10 -0
- package/src/i18n/glossary.ts +18 -0
- package/src/i18n/locales.test.ts +56 -0
- package/src/i18n/locales.ts +7 -0
- package/src/i18n/mega-menu-translations.ts +1363 -0
- package/src/i18n/prompt.ts +30 -0
- package/src/i18n/translations.ts +733 -0
- package/src/i18n/translator.ts +120 -0
- package/src/plugins/remark-mermaid.mjs +24 -0
- package/src/types/icon.ts +6 -0
- package/src/utils/localize-ecosystem-href.test.ts +65 -0
- package/src/utils/localize-ecosystem-href.ts +34 -0
- package/src/utils/resolve-icon.ts +70 -0
- package/src/utils/subcategory-sidebar.test.ts +25 -0
- package/src/utils/subcategory-sidebar.ts +316 -0
- package/styles/custom.css +807 -0
package/config.ts
ADDED
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import react from '@astrojs/react';
|
|
4
|
+
import starlight from '@astrojs/starlight';
|
|
5
|
+
import type { StarlightPlugin } from '@astrojs/starlight/types';
|
|
6
|
+
import { BCP47_TO_SLUG, SLUG_LIST } from '@f5xc-salesdemos/i18n-core';
|
|
7
|
+
import starlightLlmsTxt from '@f5xc-salesdemos/starlight-llms-txt';
|
|
8
|
+
import starlightMegaMenu from '@f5xc-salesdemos/starlight-mega-menu';
|
|
9
|
+
import type { AstroIntegration } from 'astro';
|
|
10
|
+
import { defineConfig } from 'astro/config';
|
|
11
|
+
import codeImport from 'remark-code-import';
|
|
12
|
+
import starlightHeadingBadges from 'starlight-heading-badges';
|
|
13
|
+
import starlightImageZoom from 'starlight-image-zoom';
|
|
14
|
+
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi';
|
|
15
|
+
import starlightPageActions from 'starlight-page-actions';
|
|
16
|
+
import { starlightIconsPlugin } from 'starlight-plugin-icons';
|
|
17
|
+
import starlightScrollToTop from 'starlight-scroll-to-top';
|
|
18
|
+
import starlightVideosPlugin from 'starlight-videos';
|
|
19
|
+
import f5xcDocsTheme from './index.ts';
|
|
20
|
+
import { defaultLocale as f5xcDefaultLocale, f5xcDefaultLocales } from './src/i18n/locales.ts';
|
|
21
|
+
import {
|
|
22
|
+
categoryTitles,
|
|
23
|
+
footerDescriptions,
|
|
24
|
+
footerLabels,
|
|
25
|
+
itemDescriptions,
|
|
26
|
+
itemLabels,
|
|
27
|
+
menuLabels,
|
|
28
|
+
mobileLabels,
|
|
29
|
+
} from './src/i18n/mega-menu-translations.ts';
|
|
30
|
+
import { sidebarTranslations } from './src/i18n/translations.ts';
|
|
31
|
+
import remarkMermaid from './src/plugins/remark-mermaid.mjs';
|
|
32
|
+
import { resolveIcon } from './src/utils/resolve-icon.ts';
|
|
33
|
+
import { buildSubcategorySidebar } from './src/utils/subcategory-sidebar.ts';
|
|
34
|
+
|
|
35
|
+
export type { LocaleConfig } from './src/i18n/locales.ts';
|
|
36
|
+
export { f5xcDefaultLocales } from './src/i18n/locales.ts';
|
|
37
|
+
|
|
38
|
+
interface MegaMenuItem {
|
|
39
|
+
label: string;
|
|
40
|
+
translations?: Record<string, string>;
|
|
41
|
+
href?: string;
|
|
42
|
+
content?: {
|
|
43
|
+
layout?: string;
|
|
44
|
+
columns?: number;
|
|
45
|
+
categories?: Array<{
|
|
46
|
+
title: string;
|
|
47
|
+
translations?: Record<string, string>;
|
|
48
|
+
items: Array<{
|
|
49
|
+
label: string;
|
|
50
|
+
translations?: Record<string, string>;
|
|
51
|
+
description?: string;
|
|
52
|
+
descriptionTranslations?: Record<string, string>;
|
|
53
|
+
href: string;
|
|
54
|
+
icon?: string;
|
|
55
|
+
}>;
|
|
56
|
+
}>;
|
|
57
|
+
footer?: {
|
|
58
|
+
label: string;
|
|
59
|
+
translations?: Record<string, string>;
|
|
60
|
+
href: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
descriptionTranslations?: Record<string, string>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface HeadEntry {
|
|
68
|
+
tag: string;
|
|
69
|
+
attrs?: Record<string, string>;
|
|
70
|
+
content?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface F5xcDocsConfigOptions {
|
|
74
|
+
site?: string;
|
|
75
|
+
base?: string;
|
|
76
|
+
title?: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
githubRepository?: string;
|
|
79
|
+
llmsOptionalLinks?: Array<{ title: string; url: string }>;
|
|
80
|
+
additionalIntegrations?: AstroIntegration[];
|
|
81
|
+
additionalRemarkPlugins?: Array<unknown>;
|
|
82
|
+
megaMenuItems?: MegaMenuItem[];
|
|
83
|
+
head?: HeadEntry[];
|
|
84
|
+
logo?: { src: string } | { light: string; dark: string };
|
|
85
|
+
federatedSearch?: boolean;
|
|
86
|
+
locales?: Record<string, { label: string; lang: string; dir?: 'rtl' }> | false;
|
|
87
|
+
defaultLocale?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
91
|
+
{
|
|
92
|
+
label: 'Security',
|
|
93
|
+
translations: menuLabels.Security,
|
|
94
|
+
content: {
|
|
95
|
+
layout: 'grid',
|
|
96
|
+
columns: 2,
|
|
97
|
+
categories: [
|
|
98
|
+
{
|
|
99
|
+
title: 'App & API Security',
|
|
100
|
+
translations: categoryTitles['App & API Security'],
|
|
101
|
+
items: [
|
|
102
|
+
{
|
|
103
|
+
label: 'Web App Firewall',
|
|
104
|
+
translations: itemLabels['Web App Firewall'],
|
|
105
|
+
description: 'Firewall policies and configuration',
|
|
106
|
+
descriptionTranslations: itemDescriptions['Firewall policies and configuration'],
|
|
107
|
+
href: 'https://f5xc-salesdemos.github.io/waf/',
|
|
108
|
+
icon: resolveIcon('f5xc:web-app-and-api-protection'),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: 'API Security',
|
|
112
|
+
translations: itemLabels['API Security'],
|
|
113
|
+
description: 'API discovery and protection',
|
|
114
|
+
descriptionTranslations: itemDescriptions['API discovery and protection'],
|
|
115
|
+
href: 'https://f5xc-salesdemos.github.io/api-protection/',
|
|
116
|
+
icon: resolveIcon('f5xc:application-traffic-insight'),
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: 'Client-Side Defense',
|
|
120
|
+
translations: itemLabels['Client-Side Defense'],
|
|
121
|
+
description: 'Browser-based threat protection',
|
|
122
|
+
descriptionTranslations: itemDescriptions['Browser-based threat protection'],
|
|
123
|
+
href: 'https://f5xc-salesdemos.github.io/csd/',
|
|
124
|
+
icon: resolveIcon('f5xc:client-side-defense'),
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: 'Web App Scanning',
|
|
128
|
+
translations: itemLabels['Web App Scanning'],
|
|
129
|
+
description: 'Vulnerability assessment and scanning',
|
|
130
|
+
descriptionTranslations: itemDescriptions['Vulnerability assessment and scanning'],
|
|
131
|
+
href: 'https://f5xc-salesdemos.github.io/was/',
|
|
132
|
+
icon: resolveIcon('f5xc:web-app-scanning'),
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
title: 'Threat Defense',
|
|
138
|
+
translations: categoryTitles['Threat Defense'],
|
|
139
|
+
items: [
|
|
140
|
+
{
|
|
141
|
+
label: 'Bot Defense Advanced',
|
|
142
|
+
translations: itemLabels['Bot Defense Advanced'],
|
|
143
|
+
description: 'Behavioral analysis and AI detection',
|
|
144
|
+
descriptionTranslations: itemDescriptions['Behavioral analysis and AI detection'],
|
|
145
|
+
href: 'https://f5xc-salesdemos.github.io/bot-advanced/',
|
|
146
|
+
icon: resolveIcon('f5xc:bot-defense'),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: 'Bot Defense Standard',
|
|
150
|
+
translations: itemLabels['Bot Defense Standard'],
|
|
151
|
+
description: 'Signature-based bot detection',
|
|
152
|
+
descriptionTranslations: itemDescriptions['Signature-based bot detection'],
|
|
153
|
+
href: 'https://f5xc-salesdemos.github.io/bot-standard/',
|
|
154
|
+
icon: resolveIcon('f5xc:bot-defense'),
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: 'DDoS Protection',
|
|
158
|
+
translations: itemLabels['DDoS Protection'],
|
|
159
|
+
description: 'Distributed denial-of-service mitigation',
|
|
160
|
+
descriptionTranslations: itemDescriptions['Distributed denial-of-service mitigation'],
|
|
161
|
+
href: 'https://f5xc-salesdemos.github.io/ddos/',
|
|
162
|
+
icon: resolveIcon('f5xc:ddos-and-transit-services'),
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
footer: {
|
|
168
|
+
label: 'F5 Distributed Cloud Console',
|
|
169
|
+
translations: footerLabels['F5 Distributed Cloud Console'],
|
|
170
|
+
href: 'https://console.ves.volterra.io',
|
|
171
|
+
description: 'Open the XC management portal',
|
|
172
|
+
descriptionTranslations: footerDescriptions['Open the XC management portal'],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
label: 'Networking',
|
|
178
|
+
translations: menuLabels.Networking,
|
|
179
|
+
content: {
|
|
180
|
+
layout: 'grid',
|
|
181
|
+
columns: 2,
|
|
182
|
+
categories: [
|
|
183
|
+
{
|
|
184
|
+
title: 'Connectivity & Delivery',
|
|
185
|
+
translations: categoryTitles['Connectivity & Delivery'],
|
|
186
|
+
items: [
|
|
187
|
+
{
|
|
188
|
+
label: 'Multi-Cloud Networking',
|
|
189
|
+
translations: itemLabels['Multi-Cloud Networking'],
|
|
190
|
+
description: 'Site connectivity across clouds',
|
|
191
|
+
descriptionTranslations: itemDescriptions['Site connectivity across clouds'],
|
|
192
|
+
href: 'https://f5xc-salesdemos.github.io/mcn/',
|
|
193
|
+
icon: resolveIcon('f5xc:multi-cloud-network-connect'),
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: 'Content Delivery',
|
|
197
|
+
translations: itemLabels['Content Delivery'],
|
|
198
|
+
description: 'Edge caching and distribution',
|
|
199
|
+
descriptionTranslations: itemDescriptions['Edge caching and distribution'],
|
|
200
|
+
href: 'https://f5xc-salesdemos.github.io/cdn/',
|
|
201
|
+
icon: resolveIcon('f5xc:content-delivery-network'),
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
label: 'DNS Load Balancing',
|
|
205
|
+
translations: itemLabels['DNS Load Balancing'],
|
|
206
|
+
description: 'DNS management and zones',
|
|
207
|
+
descriptionTranslations: itemDescriptions['DNS management and zones'],
|
|
208
|
+
href: 'https://f5xc-salesdemos.github.io/dns/',
|
|
209
|
+
icon: resolveIcon('f5xc:dns-management'),
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: 'NGINX Management',
|
|
213
|
+
translations: itemLabels['NGINX Management'],
|
|
214
|
+
description: 'NGINX integration and configuration',
|
|
215
|
+
descriptionTranslations: itemDescriptions['NGINX integration and configuration'],
|
|
216
|
+
href: 'https://f5xc-salesdemos.github.io/nginx/',
|
|
217
|
+
icon: resolveIcon('f5xc:nginx-one'),
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
title: 'Manage & Monitor',
|
|
223
|
+
translations: categoryTitles['Manage & Monitor'],
|
|
224
|
+
items: [
|
|
225
|
+
{
|
|
226
|
+
label: 'Observability',
|
|
227
|
+
translations: itemLabels.Observability,
|
|
228
|
+
description: 'Monitoring, metrics, and insights',
|
|
229
|
+
descriptionTranslations: itemDescriptions['Monitoring, metrics, and insights'],
|
|
230
|
+
href: 'https://f5xc-salesdemos.github.io/observability/',
|
|
231
|
+
icon: resolveIcon('f5xc:observability'),
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
label: 'Administration',
|
|
235
|
+
translations: itemLabels.Administration,
|
|
236
|
+
description: 'Tenant management and RBAC',
|
|
237
|
+
descriptionTranslations: itemDescriptions['Tenant management and RBAC'],
|
|
238
|
+
href: 'https://f5xc-salesdemos.github.io/administration/',
|
|
239
|
+
icon: resolveIcon('f5xc:administration'),
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
footer: {
|
|
245
|
+
label: 'F5 Cloud Documentation',
|
|
246
|
+
translations: footerLabels['F5 Cloud Documentation'],
|
|
247
|
+
href: 'https://docs.cloud.f5.com',
|
|
248
|
+
description: 'Official product documentation',
|
|
249
|
+
descriptionTranslations: footerDescriptions['Official product documentation'],
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
label: 'Platform',
|
|
255
|
+
translations: menuLabels.Platform,
|
|
256
|
+
content: {
|
|
257
|
+
layout: 'list',
|
|
258
|
+
categories: [
|
|
259
|
+
{
|
|
260
|
+
title: 'Documentation Tools',
|
|
261
|
+
translations: categoryTitles['Documentation Tools'],
|
|
262
|
+
items: [
|
|
263
|
+
{
|
|
264
|
+
label: 'Docs Builder',
|
|
265
|
+
translations: itemLabels['Docs Builder'],
|
|
266
|
+
description: 'Containerized Astro build system',
|
|
267
|
+
descriptionTranslations: itemDescriptions['Containerized Astro build system'],
|
|
268
|
+
href: 'https://f5xc-salesdemos.github.io/docs-builder/',
|
|
269
|
+
icon: resolveIcon('f5xc:doc'),
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
label: 'Docs Theme',
|
|
273
|
+
translations: itemLabels['Docs Theme'],
|
|
274
|
+
description: 'Shared branding and styling',
|
|
275
|
+
descriptionTranslations: itemDescriptions['Shared branding and styling'],
|
|
276
|
+
href: 'https://f5xc-salesdemos.github.io/docs-theme/',
|
|
277
|
+
icon: resolveIcon('f5xc:shared-configuration'),
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
label: 'Icon Packages',
|
|
281
|
+
translations: itemLabels['Icon Packages'],
|
|
282
|
+
description: 'NPM icon component library',
|
|
283
|
+
descriptionTranslations: itemDescriptions['NPM icon component library'],
|
|
284
|
+
href: 'https://f5xc-salesdemos.github.io/docs-icons/',
|
|
285
|
+
icon: resolveIcon('f5xc:distributed-apps'),
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
label: 'Dev Container',
|
|
289
|
+
translations: itemLabels['Dev Container'],
|
|
290
|
+
description: 'Isolated development environment',
|
|
291
|
+
descriptionTranslations: itemDescriptions['Isolated development environment'],
|
|
292
|
+
href: 'https://f5xc-salesdemos.github.io/devcontainer/',
|
|
293
|
+
icon: resolveIcon('hashicorp-flight:docker-color'),
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
label: 'mvp',
|
|
297
|
+
translations: itemLabels.mvp,
|
|
298
|
+
description:
|
|
299
|
+
'Capability program that amplifies F5 Distributed Cloud practitioners with an agentic subject matter expert',
|
|
300
|
+
descriptionTranslations:
|
|
301
|
+
itemDescriptions[
|
|
302
|
+
'Capability program that amplifies F5 Distributed Cloud practitioners with an agentic subject matter expert'
|
|
303
|
+
],
|
|
304
|
+
href: 'https://f5xc-salesdemos.github.io/mvp/',
|
|
305
|
+
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
title: 'Automation',
|
|
311
|
+
translations: categoryTitles.Automation,
|
|
312
|
+
items: [
|
|
313
|
+
{
|
|
314
|
+
label: 'Terraform Provider',
|
|
315
|
+
translations: itemLabels['Terraform Provider'],
|
|
316
|
+
description: 'F5 XC Terraform provider',
|
|
317
|
+
descriptionTranslations: itemDescriptions['F5 XC Terraform provider'],
|
|
318
|
+
href: 'https://f5xc-salesdemos.github.io/terraform-provider-f5xc/',
|
|
319
|
+
icon: resolveIcon('hashicorp-flight:terraform-color'),
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
label: 'API Specs',
|
|
323
|
+
translations: itemLabels['API Specs'],
|
|
324
|
+
description: 'OpenAPI spec validation and reconciliation',
|
|
325
|
+
descriptionTranslations: itemDescriptions['OpenAPI spec validation and reconciliation'],
|
|
326
|
+
href: 'https://f5xc-salesdemos.github.io/api-specs/',
|
|
327
|
+
icon: resolveIcon('f5xc:data-intelligence'),
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
label: 'API Specs Enriched',
|
|
331
|
+
translations: itemLabels['API Specs Enriched'],
|
|
332
|
+
description: 'Enriched OpenAPI specifications',
|
|
333
|
+
descriptionTranslations: itemDescriptions['Enriched OpenAPI specifications'],
|
|
334
|
+
href: 'https://f5xc-salesdemos.github.io/api-specs-enriched/',
|
|
335
|
+
icon: resolveIcon('f5xc:data-intelligence'),
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
},
|
|
339
|
+
],
|
|
340
|
+
footer: {
|
|
341
|
+
label: 'GitHub Organization',
|
|
342
|
+
translations: footerLabels['GitHub Organization'],
|
|
343
|
+
href: 'https://github.com/f5xc-salesdemos',
|
|
344
|
+
description: 'View all repositories',
|
|
345
|
+
descriptionTranslations: footerDescriptions['View all repositories'],
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
label: 'AI',
|
|
351
|
+
translations: menuLabels.AI,
|
|
352
|
+
content: {
|
|
353
|
+
layout: 'list',
|
|
354
|
+
categories: [
|
|
355
|
+
{
|
|
356
|
+
title: 'AI Tools',
|
|
357
|
+
translations: categoryTitles['AI Tools'],
|
|
358
|
+
items: [
|
|
359
|
+
{
|
|
360
|
+
label: 'Marketplace',
|
|
361
|
+
translations: itemLabels.Marketplace,
|
|
362
|
+
description: 'AI-powered marketplace for F5 XC',
|
|
363
|
+
descriptionTranslations: itemDescriptions['AI-powered marketplace for F5 XC'],
|
|
364
|
+
href: 'https://f5xc-salesdemos.github.io/marketplace/',
|
|
365
|
+
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
label: 'xcsh',
|
|
369
|
+
translations: itemLabels.xcsh,
|
|
370
|
+
description: 'AI-powered development CLI with persistent sessions and native Rust tooling',
|
|
371
|
+
descriptionTranslations:
|
|
372
|
+
itemDescriptions['AI-powered development CLI with persistent sessions and native Rust tooling'],
|
|
373
|
+
href: 'https://f5xc-salesdemos.github.io/xcsh/',
|
|
374
|
+
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
label: 'Console Catalog',
|
|
378
|
+
translations: itemLabels['Console Catalog'],
|
|
379
|
+
description: 'AI-driven browser automation for F5 XC UI',
|
|
380
|
+
descriptionTranslations: itemDescriptions['AI-driven browser automation for F5 XC UI'],
|
|
381
|
+
href: 'https://f5xc-salesdemos.github.io/console/',
|
|
382
|
+
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
label: 'Demo Resources',
|
|
391
|
+
translations: menuLabels['Demo Resources'],
|
|
392
|
+
content: {
|
|
393
|
+
layout: 'list',
|
|
394
|
+
categories: [
|
|
395
|
+
{
|
|
396
|
+
title: 'Components',
|
|
397
|
+
translations: categoryTitles.Components,
|
|
398
|
+
items: [
|
|
399
|
+
{
|
|
400
|
+
label: 'Origin Server',
|
|
401
|
+
translations: itemLabels['Origin Server'],
|
|
402
|
+
description: 'Vulnerable web applications for WAF and API testing',
|
|
403
|
+
descriptionTranslations: itemDescriptions['Vulnerable web applications for WAF and API testing'],
|
|
404
|
+
href: 'https://f5xc-salesdemos.github.io/origin-server/',
|
|
405
|
+
icon: resolveIcon('f5xc:distributed-apps'),
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
label: 'Traffic Generator',
|
|
409
|
+
translations: itemLabels['Traffic Generator'],
|
|
410
|
+
description: 'Security tools and attack suites for traffic generation',
|
|
411
|
+
descriptionTranslations: itemDescriptions['Security tools and attack suites for traffic generation'],
|
|
412
|
+
href: 'https://f5xc-salesdemos.github.io/traffic-generator/',
|
|
413
|
+
icon: resolveIcon('f5xc:application-traffic-insight'),
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
label: 'CDN Simulator',
|
|
417
|
+
translations: itemLabels['CDN Simulator'],
|
|
418
|
+
description: 'NGINX-based CDN edge node simulator',
|
|
419
|
+
descriptionTranslations: itemDescriptions['NGINX-based CDN edge node simulator'],
|
|
420
|
+
href: 'https://f5xc-salesdemos.github.io/cdn-simulator/',
|
|
421
|
+
icon: resolveIcon('f5xc:content-delivery-network'),
|
|
422
|
+
},
|
|
423
|
+
],
|
|
424
|
+
},
|
|
425
|
+
],
|
|
426
|
+
footer: {
|
|
427
|
+
label: 'View All Components',
|
|
428
|
+
translations: footerLabels['View All Components'],
|
|
429
|
+
href: 'https://f5xc-salesdemos.github.io/demo-resources/',
|
|
430
|
+
description: 'Browse the full demo resource catalog',
|
|
431
|
+
descriptionTranslations: footerDescriptions['Browse the full demo resource catalog'],
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
label: 'Resources',
|
|
437
|
+
translations: menuLabels.Resources,
|
|
438
|
+
content: {
|
|
439
|
+
layout: 'list',
|
|
440
|
+
categories: [
|
|
441
|
+
{
|
|
442
|
+
title: 'F5 Ecosystem',
|
|
443
|
+
translations: categoryTitles['F5 Ecosystem'],
|
|
444
|
+
items: [
|
|
445
|
+
{
|
|
446
|
+
label: 'F5 XC Console',
|
|
447
|
+
translations: itemLabels['F5 XC Console'],
|
|
448
|
+
description: 'Distributed Cloud management portal',
|
|
449
|
+
descriptionTranslations: itemDescriptions['Distributed Cloud management portal'],
|
|
450
|
+
href: 'https://console.ves.volterra.io',
|
|
451
|
+
icon: resolveIcon('f5xc:platform'),
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
label: 'F5 Cloud Docs',
|
|
455
|
+
translations: itemLabels['F5 Cloud Docs'],
|
|
456
|
+
description: 'Official product documentation',
|
|
457
|
+
descriptionTranslations: itemDescriptions['Official product documentation'],
|
|
458
|
+
href: 'https://docs.cloud.f5.com',
|
|
459
|
+
icon: resolveIcon('f5xc:doc'),
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
label: 'MyF5 Support',
|
|
463
|
+
translations: itemLabels['MyF5 Support'],
|
|
464
|
+
description: 'Technical support portal',
|
|
465
|
+
descriptionTranslations: itemDescriptions['Technical support portal'],
|
|
466
|
+
href: 'https://my.f5.com/manage/s/',
|
|
467
|
+
icon: resolveIcon('f5xc:support'),
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
},
|
|
471
|
+
],
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
label: 'Tools',
|
|
476
|
+
translations: menuLabels.Tools,
|
|
477
|
+
content: {
|
|
478
|
+
layout: 'list',
|
|
479
|
+
categories: [
|
|
480
|
+
{
|
|
481
|
+
title: 'Developer Tools',
|
|
482
|
+
translations: categoryTitles['Developer Tools'],
|
|
483
|
+
items: [
|
|
484
|
+
{
|
|
485
|
+
label: 'VS Code Extension',
|
|
486
|
+
translations: itemLabels['VS Code Extension'],
|
|
487
|
+
description: 'Manage F5 XC resources from VS Code',
|
|
488
|
+
descriptionTranslations: itemDescriptions['Manage F5 XC resources from VS Code'],
|
|
489
|
+
href: 'https://f5xc-salesdemos.github.io/vscode-f5xc-tools/',
|
|
490
|
+
icon: resolveIcon('carbon:code'),
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
label: 'xcsh CLI',
|
|
494
|
+
translations: itemLabels['xcsh CLI'],
|
|
495
|
+
description: 'AI-powered CLI for F5 XC',
|
|
496
|
+
descriptionTranslations: itemDescriptions['AI-powered CLI for F5 XC'],
|
|
497
|
+
href: 'https://f5xc-salesdemos.github.io/xcsh/',
|
|
498
|
+
icon: resolveIcon('carbon:terminal'),
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
label: 'xcsh Chrome Extension',
|
|
502
|
+
translations: itemLabels['xcsh Chrome Extension'],
|
|
503
|
+
description: 'Drive the F5 XC console with xcsh',
|
|
504
|
+
descriptionTranslations: itemDescriptions['Drive the F5 XC console with xcsh'],
|
|
505
|
+
href: 'https://f5xc-salesdemos.github.io/xcsh-chrome-extension/',
|
|
506
|
+
icon: resolveIcon('carbon:application-web'),
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
},
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
];
|
|
514
|
+
|
|
515
|
+
const defaultHead: HeadEntry[] = [
|
|
516
|
+
{
|
|
517
|
+
tag: 'script',
|
|
518
|
+
attrs: { type: 'module' },
|
|
519
|
+
content: `
|
|
520
|
+
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
|
521
|
+
|
|
522
|
+
mermaid.registerIconPacks([
|
|
523
|
+
{ name: 'hashicorp-flight', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-hashicorp-flight/icons.json').then(r => r.json()) },
|
|
524
|
+
{ name: 'f5-brand', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-f5-brand/icons.json').then(r => r.json()) },
|
|
525
|
+
{ name: 'f5xc', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-f5xc/icons.json').then(r => r.json()) },
|
|
526
|
+
{ name: 'carbon', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-carbon/icons.json').then(r => r.json()) },
|
|
527
|
+
{ name: 'lucide', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-lucide/icons.json').then(r => r.json()) },
|
|
528
|
+
{ name: 'mdi', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-mdi/icons.json').then(r => r.json()) },
|
|
529
|
+
{ name: 'phosphor', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-phosphor/icons.json').then(r => r.json()) },
|
|
530
|
+
{ name: 'tabler', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-tabler/icons.json').then(r => r.json()) },
|
|
531
|
+
{ name: 'azure', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5xc-salesdemos/icons-azure/icons.json').then(r => r.json()) },
|
|
532
|
+
]);
|
|
533
|
+
|
|
534
|
+
mermaid.initialize({
|
|
535
|
+
startOnLoad: true,
|
|
536
|
+
theme: 'base',
|
|
537
|
+
themeVariables: {
|
|
538
|
+
primaryColor: '#e8ecf4',
|
|
539
|
+
primaryTextColor: '#1a1a2e',
|
|
540
|
+
primaryBorderColor: '#0e41aa',
|
|
541
|
+
lineColor: '#0e41aa',
|
|
542
|
+
secondaryColor: '#fff5eb',
|
|
543
|
+
secondaryTextColor: '#1a1a2e',
|
|
544
|
+
secondaryBorderColor: '#f29a36',
|
|
545
|
+
tertiaryColor: '#f0e6f6',
|
|
546
|
+
tertiaryTextColor: '#1a1a2e',
|
|
547
|
+
tertiaryBorderColor: '#62228b',
|
|
548
|
+
noteBkgColor: '#ffe4c4',
|
|
549
|
+
noteTextColor: '#1a1a2e',
|
|
550
|
+
noteBorderColor: '#f29a36',
|
|
551
|
+
fontFamily: 'F5, system-ui, sans-serif',
|
|
552
|
+
},
|
|
553
|
+
});
|
|
554
|
+
`,
|
|
555
|
+
},
|
|
556
|
+
];
|
|
557
|
+
|
|
558
|
+
const federatedSearchSites = [
|
|
559
|
+
{ repo: 'docs-builder', label: 'Docs Builder' },
|
|
560
|
+
{ repo: 'docs-theme', label: 'Docs Theme' },
|
|
561
|
+
{ repo: 'docs', label: 'F5 XC Docs' },
|
|
562
|
+
{ repo: 'administration', label: 'Administration' },
|
|
563
|
+
{ repo: 'nginx', label: 'NGINX' },
|
|
564
|
+
{ repo: 'observability', label: 'Observability' },
|
|
565
|
+
{ repo: 'was', label: 'Web App Scanning' },
|
|
566
|
+
{ repo: 'mcn', label: 'Multi-Cloud Networking' },
|
|
567
|
+
{ repo: 'dns', label: 'DNS' },
|
|
568
|
+
{ repo: 'cdn', label: 'CDN' },
|
|
569
|
+
{ repo: 'bot-standard', label: 'Bot Standard' },
|
|
570
|
+
{ repo: 'bot-advanced', label: 'Bot Advanced' },
|
|
571
|
+
{ repo: 'ddos', label: 'DDoS' },
|
|
572
|
+
{ repo: 'waf', label: 'WAF' },
|
|
573
|
+
{ repo: 'api-protection', label: 'API Security' },
|
|
574
|
+
{ repo: 'xcsh', label: 'xcsh' },
|
|
575
|
+
{ repo: 'csd', label: 'Client-Side Defense' },
|
|
576
|
+
{ repo: 'docs-icons', label: 'Docs Icons' },
|
|
577
|
+
{ repo: 'devcontainer', label: 'Dev Container' },
|
|
578
|
+
{ repo: 'marketplace', label: 'Marketplace' },
|
|
579
|
+
{ repo: 'api-specs', label: 'API Specs' },
|
|
580
|
+
{ repo: 'api-specs-enriched', label: 'API Specs Enriched' },
|
|
581
|
+
{ repo: 'cdn-simulator', label: 'CDN Simulator' },
|
|
582
|
+
{ repo: 'origin-server', label: 'Origin Server' },
|
|
583
|
+
{ repo: 'traffic-generator', label: 'Traffic Generator' },
|
|
584
|
+
{ repo: 'demo-resources', label: 'Demo Resources' },
|
|
585
|
+
{ repo: 'xcsh-chrome-extension', label: 'xcsh Chrome Extension' },
|
|
586
|
+
{ repo: 'console', label: 'Console Catalog' },
|
|
587
|
+
];
|
|
588
|
+
|
|
589
|
+
export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
|
|
590
|
+
const site = options.site || process.env.DOCS_SITE || 'https://f5xc-salesdemos.github.io';
|
|
591
|
+
const base = options.base || process.env.DOCS_BASE || '/';
|
|
592
|
+
const title = options.title || process.env.DOCS_TITLE || 'Documentation';
|
|
593
|
+
const description = options.description || process.env.DOCS_DESCRIPTION || '';
|
|
594
|
+
const githubRepository = options.githubRepository || process.env.GITHUB_REPOSITORY || '';
|
|
595
|
+
let llmsOptionalLinks: Array<{ title: string; url: string }> = options.llmsOptionalLinks || [];
|
|
596
|
+
if (!options.llmsOptionalLinks && process.env.LLMS_OPTIONAL_LINKS) {
|
|
597
|
+
try {
|
|
598
|
+
llmsOptionalLinks = JSON.parse(process.env.LLMS_OPTIONAL_LINKS);
|
|
599
|
+
} catch (e) {
|
|
600
|
+
console.warn('[docs-theme] LLMS_OPTIONAL_LINKS contains invalid JSON; using defaults.', e);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
let llmsConfig: Record<string, unknown> = {};
|
|
604
|
+
if (process.env.LLMS_CONFIG) {
|
|
605
|
+
try {
|
|
606
|
+
llmsConfig = JSON.parse(process.env.LLMS_CONFIG);
|
|
607
|
+
} catch (e) {
|
|
608
|
+
console.warn('[docs-theme] LLMS_CONFIG contains invalid JSON; using defaults.', e);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
let llmsFederatedSites: unknown[] = [];
|
|
612
|
+
if (process.env.LLMS_FEDERATED_SITES) {
|
|
613
|
+
try {
|
|
614
|
+
llmsFederatedSites = JSON.parse(process.env.LLMS_FEDERATED_SITES);
|
|
615
|
+
} catch (e) {
|
|
616
|
+
console.warn('[docs-theme] LLMS_FEDERATED_SITES contains invalid JSON; using defaults.', e);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
let llmsFederatedSiteCategories: unknown[] = [];
|
|
620
|
+
if (process.env.LLMS_FEDERATED_SITE_CATEGORIES) {
|
|
621
|
+
try {
|
|
622
|
+
llmsFederatedSiteCategories = JSON.parse(process.env.LLMS_FEDERATED_SITE_CATEGORIES);
|
|
623
|
+
} catch (e) {
|
|
624
|
+
console.warn('[docs-theme] LLMS_FEDERATED_SITE_CATEGORIES contains invalid JSON; using defaults.', e);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
let openAPISpecs: Array<{ base: string; schema: string; sidebar?: { label?: string; collapsed?: boolean } }> = [];
|
|
628
|
+
if (process.env.OPENAPI_SPECS_CONFIG) {
|
|
629
|
+
try {
|
|
630
|
+
openAPISpecs = JSON.parse(process.env.OPENAPI_SPECS_CONFIG);
|
|
631
|
+
} catch (e) {
|
|
632
|
+
console.warn('[docs-theme] OPENAPI_SPECS_CONFIG contains invalid JSON; skipping OpenAPI plugin.', e);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
const megaMenuItems = options.megaMenuItems || defaultMegaMenuItems;
|
|
636
|
+
const head = options.head || defaultHead;
|
|
637
|
+
const logo = options.logo || { src: '@f5xc-salesdemos/docs-theme/assets/f5-distributed-cloud.svg' };
|
|
638
|
+
const additionalRemarkPlugins = options.additionalRemarkPlugins || [];
|
|
639
|
+
const additionalIntegrations = options.additionalIntegrations || [];
|
|
640
|
+
|
|
641
|
+
const federatedSearch = options.federatedSearch !== false;
|
|
642
|
+
const normalizedBase = base.replace(/\/+$/, '');
|
|
643
|
+
const mergeIndex = federatedSearch
|
|
644
|
+
? federatedSearchSites
|
|
645
|
+
.filter((s) => `/${s.repo}` !== normalizedBase)
|
|
646
|
+
.map((s) => ({
|
|
647
|
+
bundlePath: `${site}/${s.repo}/pagefind/`,
|
|
648
|
+
}))
|
|
649
|
+
: undefined;
|
|
650
|
+
|
|
651
|
+
const starlightPlugins: StarlightPlugin[] = [
|
|
652
|
+
starlightMegaMenu({ items: megaMenuItems as Parameters<typeof starlightMegaMenu>[0]['items'], mobileLabels }),
|
|
653
|
+
starlightVideosPlugin(),
|
|
654
|
+
starlightImageZoom(),
|
|
655
|
+
f5xcDocsTheme(),
|
|
656
|
+
starlightScrollToTop({
|
|
657
|
+
showTooltip: true,
|
|
658
|
+
tooltipText: {
|
|
659
|
+
en: 'Scroll to top',
|
|
660
|
+
fr: 'Retour en haut',
|
|
661
|
+
es: 'Volver arriba',
|
|
662
|
+
de: 'Nach oben',
|
|
663
|
+
'pt-BR': 'Voltar ao topo',
|
|
664
|
+
ja: 'トップに戻る',
|
|
665
|
+
ko: '맨 위로',
|
|
666
|
+
'zh-CN': '回到顶部',
|
|
667
|
+
'zh-TW': '回到頂部',
|
|
668
|
+
ar: 'العودة للأعلى',
|
|
669
|
+
it: 'Torna su',
|
|
670
|
+
hi: 'शीर्ष पर जाएँ',
|
|
671
|
+
th: 'กลับไปด้านบน',
|
|
672
|
+
},
|
|
673
|
+
smoothScroll: true,
|
|
674
|
+
threshold: 10,
|
|
675
|
+
showProgressRing: true,
|
|
676
|
+
progressRingColor: '#e4002b',
|
|
677
|
+
showOnHomepage: false,
|
|
678
|
+
}),
|
|
679
|
+
starlightHeadingBadges(),
|
|
680
|
+
starlightPageActions(),
|
|
681
|
+
starlightIconsPlugin(),
|
|
682
|
+
...(openAPISpecs.length > 0
|
|
683
|
+
? [
|
|
684
|
+
starlightOpenAPI(
|
|
685
|
+
openAPISpecs.map((spec) => ({
|
|
686
|
+
base: spec.base,
|
|
687
|
+
schema: spec.schema,
|
|
688
|
+
sidebar: {
|
|
689
|
+
collapsed: spec.sidebar?.collapsed ?? true,
|
|
690
|
+
label: spec.sidebar?.label,
|
|
691
|
+
},
|
|
692
|
+
})),
|
|
693
|
+
),
|
|
694
|
+
]
|
|
695
|
+
: []),
|
|
696
|
+
starlightLlmsTxt({
|
|
697
|
+
projectName: title,
|
|
698
|
+
description,
|
|
699
|
+
rawContent: false,
|
|
700
|
+
optionalLinks: llmsOptionalLinks,
|
|
701
|
+
sidebarNav: true,
|
|
702
|
+
tieredHierarchy: true,
|
|
703
|
+
promote: llmsConfig.promote || ['index*', 'overview*'],
|
|
704
|
+
demote: llmsConfig.demote || ['references*'],
|
|
705
|
+
...(llmsFederatedSites.length > 0 ? { federatedSites: llmsFederatedSites } : {}),
|
|
706
|
+
...(llmsFederatedSiteCategories.length > 0 ? { federatedSiteCategories: llmsFederatedSiteCategories } : {}),
|
|
707
|
+
}),
|
|
708
|
+
];
|
|
709
|
+
|
|
710
|
+
const contentDir = process.env.CONTENT_DIR || 'src/content/docs';
|
|
711
|
+
const subcategorySidebar = buildSubcategorySidebar(contentDir);
|
|
712
|
+
|
|
713
|
+
// Auto-detect i18n: enable locales only when content has an en/ subdirectory.
|
|
714
|
+
// Repos that haven't migrated to docs/en/ won't get a broken language selector.
|
|
715
|
+
const hasEnSubdir = fs.existsSync(path.resolve(contentDir, 'en'));
|
|
716
|
+
const resolvedLocales =
|
|
717
|
+
options.locales === false ? undefined : options.locales || (hasEnSubdir ? f5xcDefaultLocales : undefined);
|
|
718
|
+
const resolvedDefaultLocale = options.defaultLocale || f5xcDefaultLocale;
|
|
719
|
+
|
|
720
|
+
const localeHeadScripts: HeadEntry[] = [];
|
|
721
|
+
if (resolvedLocales) {
|
|
722
|
+
const langToSlugMap = BCP47_TO_SLUG;
|
|
723
|
+
const slugSet = JSON.stringify(SLUG_LIST);
|
|
724
|
+
|
|
725
|
+
localeHeadScripts.push({
|
|
726
|
+
tag: 'script',
|
|
727
|
+
content: `
|
|
728
|
+
(function(){
|
|
729
|
+
try {
|
|
730
|
+
var stored = localStorage.getItem('f5xc-locale');
|
|
731
|
+
if (!stored || stored === '${resolvedDefaultLocale}') return;
|
|
732
|
+
if (sessionStorage.getItem('f5xc-locale-redirected')) return;
|
|
733
|
+
var valid = new Set(${slugSet});
|
|
734
|
+
if (!valid.has(stored)) return;
|
|
735
|
+
var base = '${normalizedBase}';
|
|
736
|
+
var path = window.location.pathname;
|
|
737
|
+
var afterBase = path.slice(base.length).replace(/^\\/+/, '').replace(/\\/+$/, '');
|
|
738
|
+
var segments = afterBase ? afterBase.split('/') : [];
|
|
739
|
+
if (segments.length > 1) return;
|
|
740
|
+
if (segments[0] === '${resolvedDefaultLocale}') {
|
|
741
|
+
sessionStorage.setItem('f5xc-locale-redirected', '1');
|
|
742
|
+
window.location.replace(base + '/' + stored + '/');
|
|
743
|
+
}
|
|
744
|
+
} catch(e) {}
|
|
745
|
+
})();
|
|
746
|
+
`,
|
|
747
|
+
});
|
|
748
|
+
|
|
749
|
+
localeHeadScripts.push({
|
|
750
|
+
tag: 'script',
|
|
751
|
+
content: `
|
|
752
|
+
(function(){
|
|
753
|
+
try {
|
|
754
|
+
var m = ${JSON.stringify(langToSlugMap)};
|
|
755
|
+
var lang = document.documentElement.lang || 'en';
|
|
756
|
+
var slug = m[lang] || lang.toLowerCase();
|
|
757
|
+
localStorage.setItem('f5xc-locale', slug);
|
|
758
|
+
} catch(e) {}
|
|
759
|
+
})();
|
|
760
|
+
`,
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
return defineConfig({
|
|
765
|
+
site,
|
|
766
|
+
base,
|
|
767
|
+
...(resolvedLocales ? { redirects: { '/': `${normalizedBase}/${resolvedDefaultLocale}/` } } : {}),
|
|
768
|
+
markdown: {
|
|
769
|
+
remarkPlugins: [remarkMermaid, [codeImport, { allowImportingFromOutside: true }], ...additionalRemarkPlugins],
|
|
770
|
+
},
|
|
771
|
+
integrations: [
|
|
772
|
+
starlight({
|
|
773
|
+
title,
|
|
774
|
+
plugins: starlightPlugins,
|
|
775
|
+
head: [...((head as Parameters<typeof starlight>[0]['head']) || []), ...localeHeadScripts] as Parameters<
|
|
776
|
+
typeof starlight
|
|
777
|
+
>[0]['head'],
|
|
778
|
+
logo: logo as Parameters<typeof starlight>[0]['logo'],
|
|
779
|
+
...(resolvedLocales ? { locales: resolvedLocales, defaultLocale: resolvedDefaultLocale } : {}),
|
|
780
|
+
...(subcategorySidebar
|
|
781
|
+
? { sidebar: [...subcategorySidebar, ...(openAPISpecs.length > 0 ? openAPISidebarGroups : [])] }
|
|
782
|
+
: openAPISpecs.length > 0
|
|
783
|
+
? {
|
|
784
|
+
sidebar: [
|
|
785
|
+
{
|
|
786
|
+
label: 'API Reference',
|
|
787
|
+
translations: sidebarTranslations['API Reference'],
|
|
788
|
+
items: [
|
|
789
|
+
{ label: 'Overview', translations: sidebarTranslations.Overview, slug: 'api-reference' },
|
|
790
|
+
...openAPISidebarGroups,
|
|
791
|
+
],
|
|
792
|
+
},
|
|
793
|
+
],
|
|
794
|
+
}
|
|
795
|
+
: {}),
|
|
796
|
+
...(mergeIndex && mergeIndex.length > 0 ? { pagefind: { mergeIndex } } : {}),
|
|
797
|
+
...(githubRepository
|
|
798
|
+
? {
|
|
799
|
+
editLink: {
|
|
800
|
+
baseUrl: `https://github.com/${githubRepository}/edit/main/`,
|
|
801
|
+
},
|
|
802
|
+
}
|
|
803
|
+
: {}),
|
|
804
|
+
social: [
|
|
805
|
+
{
|
|
806
|
+
label: 'GitHub',
|
|
807
|
+
icon: 'github',
|
|
808
|
+
href: `https://github.com/${githubRepository}`,
|
|
809
|
+
},
|
|
810
|
+
],
|
|
811
|
+
}),
|
|
812
|
+
react(),
|
|
813
|
+
...additionalIntegrations,
|
|
814
|
+
],
|
|
815
|
+
});
|
|
816
|
+
}
|