@f5-sales-demo/docs-theme 3.9.0 → 3.9.1
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/astro.config.mjs +1 -1
- package/bin/translate.mjs +2 -2
- package/components/Banner.astro +1 -1
- package/components/Icon.astro +3 -3
- package/components/SiteTitle.astro +1 -1
- package/config.ts +46 -46
- package/index.ts +9 -9
- package/package.json +1 -1
- package/src/i18n/locales.ts +1 -1
- package/src/i18n/mega-menu-translations.ts +1 -1
- package/src/utils/localize-ecosystem-href.test.ts +9 -9
- package/src/utils/localize-ecosystem-href.ts +2 -2
- package/src/utils/resolve-icon.ts +3 -3
package/astro.config.mjs
CHANGED
package/bin/translate.mjs
CHANGED
|
@@ -17,8 +17,8 @@ async function main() {
|
|
|
17
17
|
process.exit(0);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const { f5xcDefaultLocales } = await import('@
|
|
21
|
-
const { translateFile } = await import('@
|
|
20
|
+
const { f5xcDefaultLocales } = await import('@f5-sales-demo/docs-theme/src/i18n/locales.ts');
|
|
21
|
+
const { translateFile } = await import('@f5-sales-demo/docs-theme/src/i18n/translator.ts');
|
|
22
22
|
|
|
23
23
|
const contentDir = process.env.CONTENT_DIR || 'src/content/docs';
|
|
24
24
|
const resolvedContentDir = path.resolve(process.cwd(), contentDir);
|
package/components/Banner.astro
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Default from '@astrojs/starlight/components/Banner.astro';
|
|
3
3
|
|
|
4
|
-
const docsHome = process.env.DOCS_HOME || 'https://
|
|
4
|
+
const docsHome = process.env.DOCS_HOME || 'https://f5-sales-demo.github.io/docs/';
|
|
5
5
|
const { sidebar, entry, siteTitle, editUrl } = Astro.locals.starlightRoute;
|
|
6
6
|
const t = Astro.locals.t;
|
|
7
7
|
|
package/components/Icon.astro
CHANGED
|
@@ -40,13 +40,13 @@ if (isScoped) {
|
|
|
40
40
|
iconData = (await import('@iconify-json/tabler/icons.json')).default;
|
|
41
41
|
break;
|
|
42
42
|
case 'f5-brand':
|
|
43
|
-
iconData = (await import('@
|
|
43
|
+
iconData = (await import('@f5-sales-demo/icons-f5-brand/icons.json')).default;
|
|
44
44
|
break;
|
|
45
45
|
case 'f5xc':
|
|
46
|
-
iconData = (await import('@
|
|
46
|
+
iconData = (await import('@f5-sales-demo/icons-f5xc/icons.json')).default;
|
|
47
47
|
break;
|
|
48
48
|
case 'hashicorp-flight':
|
|
49
|
-
iconData = (await import('@
|
|
49
|
+
iconData = (await import('@f5-sales-demo/icons-hashicorp-flight/icons.json')).default;
|
|
50
50
|
break;
|
|
51
51
|
default:
|
|
52
52
|
throw new Error(
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import config from 'virtual:starlight/user-config';
|
|
3
3
|
import { logos } from 'virtual:starlight/user-images';
|
|
4
4
|
|
|
5
|
-
const docsHome = process.env.DOCS_HOME || 'https://
|
|
5
|
+
const docsHome = process.env.DOCS_HOME || 'https://f5-sales-demo.github.io/docs/';
|
|
6
6
|
const { siteTitle } = Astro.locals.starlightRoute;
|
|
7
7
|
---
|
|
8
8
|
|
package/config.ts
CHANGED
|
@@ -3,9 +3,9 @@ import path from 'node:path';
|
|
|
3
3
|
import react from '@astrojs/react';
|
|
4
4
|
import starlight from '@astrojs/starlight';
|
|
5
5
|
import type { StarlightPlugin } from '@astrojs/starlight/types';
|
|
6
|
-
import { BCP47_TO_SLUG, SLUG_LIST } from '@
|
|
7
|
-
import starlightLlmsTxt from '@
|
|
8
|
-
import starlightMegaMenu from '@
|
|
6
|
+
import { BCP47_TO_SLUG, SLUG_LIST } from '@f5-sales-demo/i18n-core';
|
|
7
|
+
import starlightLlmsTxt from '@f5-sales-demo/starlight-llms-txt';
|
|
8
|
+
import starlightMegaMenu from '@f5-sales-demo/starlight-mega-menu';
|
|
9
9
|
import type { AstroIntegration } from 'astro';
|
|
10
10
|
import { defineConfig } from 'astro/config';
|
|
11
11
|
import codeImport from 'remark-code-import';
|
|
@@ -104,7 +104,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
104
104
|
translations: itemLabels['Web App Firewall'],
|
|
105
105
|
description: 'Firewall policies and configuration',
|
|
106
106
|
descriptionTranslations: itemDescriptions['Firewall policies and configuration'],
|
|
107
|
-
href: 'https://
|
|
107
|
+
href: 'https://f5-sales-demo.github.io/waf/',
|
|
108
108
|
icon: resolveIcon('f5xc:web-app-and-api-protection'),
|
|
109
109
|
},
|
|
110
110
|
{
|
|
@@ -112,7 +112,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
112
112
|
translations: itemLabels['API Security'],
|
|
113
113
|
description: 'API discovery and protection',
|
|
114
114
|
descriptionTranslations: itemDescriptions['API discovery and protection'],
|
|
115
|
-
href: 'https://
|
|
115
|
+
href: 'https://f5-sales-demo.github.io/api-protection/',
|
|
116
116
|
icon: resolveIcon('f5xc:application-traffic-insight'),
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
120
120
|
translations: itemLabels['Client-Side Defense'],
|
|
121
121
|
description: 'Browser-based threat protection',
|
|
122
122
|
descriptionTranslations: itemDescriptions['Browser-based threat protection'],
|
|
123
|
-
href: 'https://
|
|
123
|
+
href: 'https://f5-sales-demo.github.io/csd/',
|
|
124
124
|
icon: resolveIcon('f5xc:client-side-defense'),
|
|
125
125
|
},
|
|
126
126
|
{
|
|
@@ -128,7 +128,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
128
128
|
translations: itemLabels['Web App Scanning'],
|
|
129
129
|
description: 'Vulnerability assessment and scanning',
|
|
130
130
|
descriptionTranslations: itemDescriptions['Vulnerability assessment and scanning'],
|
|
131
|
-
href: 'https://
|
|
131
|
+
href: 'https://f5-sales-demo.github.io/was/',
|
|
132
132
|
icon: resolveIcon('f5xc:web-app-scanning'),
|
|
133
133
|
},
|
|
134
134
|
],
|
|
@@ -142,7 +142,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
142
142
|
translations: itemLabels['Bot Defense Advanced'],
|
|
143
143
|
description: 'Behavioral analysis and AI detection',
|
|
144
144
|
descriptionTranslations: itemDescriptions['Behavioral analysis and AI detection'],
|
|
145
|
-
href: 'https://
|
|
145
|
+
href: 'https://f5-sales-demo.github.io/bot-advanced/',
|
|
146
146
|
icon: resolveIcon('f5xc:bot-defense'),
|
|
147
147
|
},
|
|
148
148
|
{
|
|
@@ -150,7 +150,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
150
150
|
translations: itemLabels['Bot Defense Standard'],
|
|
151
151
|
description: 'Signature-based bot detection',
|
|
152
152
|
descriptionTranslations: itemDescriptions['Signature-based bot detection'],
|
|
153
|
-
href: 'https://
|
|
153
|
+
href: 'https://f5-sales-demo.github.io/bot-standard/',
|
|
154
154
|
icon: resolveIcon('f5xc:bot-defense'),
|
|
155
155
|
},
|
|
156
156
|
{
|
|
@@ -158,7 +158,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
158
158
|
translations: itemLabels['DDoS Protection'],
|
|
159
159
|
description: 'Distributed denial-of-service mitigation',
|
|
160
160
|
descriptionTranslations: itemDescriptions['Distributed denial-of-service mitigation'],
|
|
161
|
-
href: 'https://
|
|
161
|
+
href: 'https://f5-sales-demo.github.io/ddos/',
|
|
162
162
|
icon: resolveIcon('f5xc:ddos-and-transit-services'),
|
|
163
163
|
},
|
|
164
164
|
],
|
|
@@ -189,7 +189,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
189
189
|
translations: itemLabels['Multi-Cloud Networking'],
|
|
190
190
|
description: 'Site connectivity across clouds',
|
|
191
191
|
descriptionTranslations: itemDescriptions['Site connectivity across clouds'],
|
|
192
|
-
href: 'https://
|
|
192
|
+
href: 'https://f5-sales-demo.github.io/mcn/',
|
|
193
193
|
icon: resolveIcon('f5xc:multi-cloud-network-connect'),
|
|
194
194
|
},
|
|
195
195
|
{
|
|
@@ -197,7 +197,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
197
197
|
translations: itemLabels['Content Delivery'],
|
|
198
198
|
description: 'Edge caching and distribution',
|
|
199
199
|
descriptionTranslations: itemDescriptions['Edge caching and distribution'],
|
|
200
|
-
href: 'https://
|
|
200
|
+
href: 'https://f5-sales-demo.github.io/cdn/',
|
|
201
201
|
icon: resolveIcon('f5xc:content-delivery-network'),
|
|
202
202
|
},
|
|
203
203
|
{
|
|
@@ -205,7 +205,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
205
205
|
translations: itemLabels['DNS Load Balancing'],
|
|
206
206
|
description: 'DNS management and zones',
|
|
207
207
|
descriptionTranslations: itemDescriptions['DNS management and zones'],
|
|
208
|
-
href: 'https://
|
|
208
|
+
href: 'https://f5-sales-demo.github.io/dns/',
|
|
209
209
|
icon: resolveIcon('f5xc:dns-management'),
|
|
210
210
|
},
|
|
211
211
|
{
|
|
@@ -213,7 +213,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
213
213
|
translations: itemLabels['NGINX Management'],
|
|
214
214
|
description: 'NGINX integration and configuration',
|
|
215
215
|
descriptionTranslations: itemDescriptions['NGINX integration and configuration'],
|
|
216
|
-
href: 'https://
|
|
216
|
+
href: 'https://f5-sales-demo.github.io/nginx/',
|
|
217
217
|
icon: resolveIcon('f5xc:nginx-one'),
|
|
218
218
|
},
|
|
219
219
|
],
|
|
@@ -227,7 +227,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
227
227
|
translations: itemLabels.Observability,
|
|
228
228
|
description: 'Monitoring, metrics, and insights',
|
|
229
229
|
descriptionTranslations: itemDescriptions['Monitoring, metrics, and insights'],
|
|
230
|
-
href: 'https://
|
|
230
|
+
href: 'https://f5-sales-demo.github.io/observability/',
|
|
231
231
|
icon: resolveIcon('f5xc:observability'),
|
|
232
232
|
},
|
|
233
233
|
{
|
|
@@ -235,7 +235,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
235
235
|
translations: itemLabels.Administration,
|
|
236
236
|
description: 'Tenant management and RBAC',
|
|
237
237
|
descriptionTranslations: itemDescriptions['Tenant management and RBAC'],
|
|
238
|
-
href: 'https://
|
|
238
|
+
href: 'https://f5-sales-demo.github.io/administration/',
|
|
239
239
|
icon: resolveIcon('f5xc:administration'),
|
|
240
240
|
},
|
|
241
241
|
],
|
|
@@ -265,7 +265,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
265
265
|
translations: itemLabels['Docs Builder'],
|
|
266
266
|
description: 'Containerized Astro build system',
|
|
267
267
|
descriptionTranslations: itemDescriptions['Containerized Astro build system'],
|
|
268
|
-
href: 'https://
|
|
268
|
+
href: 'https://f5-sales-demo.github.io/docs-builder/',
|
|
269
269
|
icon: resolveIcon('f5xc:doc'),
|
|
270
270
|
},
|
|
271
271
|
{
|
|
@@ -273,7 +273,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
273
273
|
translations: itemLabels['Docs Theme'],
|
|
274
274
|
description: 'Shared branding and styling',
|
|
275
275
|
descriptionTranslations: itemDescriptions['Shared branding and styling'],
|
|
276
|
-
href: 'https://
|
|
276
|
+
href: 'https://f5-sales-demo.github.io/docs-theme/',
|
|
277
277
|
icon: resolveIcon('f5xc:shared-configuration'),
|
|
278
278
|
},
|
|
279
279
|
{
|
|
@@ -281,7 +281,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
281
281
|
translations: itemLabels['Icon Packages'],
|
|
282
282
|
description: 'NPM icon component library',
|
|
283
283
|
descriptionTranslations: itemDescriptions['NPM icon component library'],
|
|
284
|
-
href: 'https://
|
|
284
|
+
href: 'https://f5-sales-demo.github.io/docs-icons/',
|
|
285
285
|
icon: resolveIcon('f5xc:distributed-apps'),
|
|
286
286
|
},
|
|
287
287
|
{
|
|
@@ -289,7 +289,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
289
289
|
translations: itemLabels['Dev Container'],
|
|
290
290
|
description: 'Isolated development environment',
|
|
291
291
|
descriptionTranslations: itemDescriptions['Isolated development environment'],
|
|
292
|
-
href: 'https://
|
|
292
|
+
href: 'https://f5-sales-demo.github.io/devcontainer/',
|
|
293
293
|
icon: resolveIcon('hashicorp-flight:docker-color'),
|
|
294
294
|
},
|
|
295
295
|
{
|
|
@@ -301,7 +301,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
301
301
|
itemDescriptions[
|
|
302
302
|
'Capability program that amplifies F5 Distributed Cloud practitioners with an agentic subject matter expert'
|
|
303
303
|
],
|
|
304
|
-
href: 'https://
|
|
304
|
+
href: 'https://f5-sales-demo.github.io/mvp/',
|
|
305
305
|
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
306
306
|
},
|
|
307
307
|
],
|
|
@@ -315,7 +315,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
315
315
|
translations: itemLabels['Terraform Provider'],
|
|
316
316
|
description: 'F5 XC Terraform provider',
|
|
317
317
|
descriptionTranslations: itemDescriptions['F5 XC Terraform provider'],
|
|
318
|
-
href: 'https://
|
|
318
|
+
href: 'https://f5-sales-demo.github.io/terraform-provider-f5xc/',
|
|
319
319
|
icon: resolveIcon('hashicorp-flight:terraform-color'),
|
|
320
320
|
},
|
|
321
321
|
{
|
|
@@ -323,7 +323,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
323
323
|
translations: itemLabels['API Specs'],
|
|
324
324
|
description: 'OpenAPI spec validation and reconciliation',
|
|
325
325
|
descriptionTranslations: itemDescriptions['OpenAPI spec validation and reconciliation'],
|
|
326
|
-
href: 'https://
|
|
326
|
+
href: 'https://f5-sales-demo.github.io/api-specs/',
|
|
327
327
|
icon: resolveIcon('f5xc:data-intelligence'),
|
|
328
328
|
},
|
|
329
329
|
{
|
|
@@ -331,7 +331,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
331
331
|
translations: itemLabels['API Specs Enriched'],
|
|
332
332
|
description: 'Enriched OpenAPI specifications',
|
|
333
333
|
descriptionTranslations: itemDescriptions['Enriched OpenAPI specifications'],
|
|
334
|
-
href: 'https://
|
|
334
|
+
href: 'https://f5-sales-demo.github.io/api-specs-enriched/',
|
|
335
335
|
icon: resolveIcon('f5xc:data-intelligence'),
|
|
336
336
|
},
|
|
337
337
|
],
|
|
@@ -340,7 +340,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
340
340
|
footer: {
|
|
341
341
|
label: 'GitHub Organization',
|
|
342
342
|
translations: footerLabels['GitHub Organization'],
|
|
343
|
-
href: 'https://github.com/
|
|
343
|
+
href: 'https://github.com/f5-sales-demo',
|
|
344
344
|
description: 'View all repositories',
|
|
345
345
|
descriptionTranslations: footerDescriptions['View all repositories'],
|
|
346
346
|
},
|
|
@@ -361,7 +361,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
361
361
|
translations: itemLabels.Marketplace,
|
|
362
362
|
description: 'AI-powered marketplace for F5 XC',
|
|
363
363
|
descriptionTranslations: itemDescriptions['AI-powered marketplace for F5 XC'],
|
|
364
|
-
href: 'https://
|
|
364
|
+
href: 'https://f5-sales-demo.github.io/marketplace/',
|
|
365
365
|
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
366
366
|
},
|
|
367
367
|
{
|
|
@@ -370,7 +370,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
370
370
|
description: 'AI-powered development CLI with persistent sessions and native Rust tooling',
|
|
371
371
|
descriptionTranslations:
|
|
372
372
|
itemDescriptions['AI-powered development CLI with persistent sessions and native Rust tooling'],
|
|
373
|
-
href: 'https://
|
|
373
|
+
href: 'https://f5-sales-demo.github.io/xcsh/',
|
|
374
374
|
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
375
375
|
},
|
|
376
376
|
{
|
|
@@ -378,7 +378,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
378
378
|
translations: itemLabels['Console Catalog'],
|
|
379
379
|
description: 'AI-driven browser automation for F5 XC UI',
|
|
380
380
|
descriptionTranslations: itemDescriptions['AI-driven browser automation for F5 XC UI'],
|
|
381
|
-
href: 'https://
|
|
381
|
+
href: 'https://f5-sales-demo.github.io/console/',
|
|
382
382
|
icon: resolveIcon('f5xc:ai_assistant_logo'),
|
|
383
383
|
},
|
|
384
384
|
],
|
|
@@ -401,7 +401,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
401
401
|
translations: itemLabels['Origin Server'],
|
|
402
402
|
description: 'Vulnerable web applications for WAF and API testing',
|
|
403
403
|
descriptionTranslations: itemDescriptions['Vulnerable web applications for WAF and API testing'],
|
|
404
|
-
href: 'https://
|
|
404
|
+
href: 'https://f5-sales-demo.github.io/origin-server/',
|
|
405
405
|
icon: resolveIcon('f5xc:distributed-apps'),
|
|
406
406
|
},
|
|
407
407
|
{
|
|
@@ -409,7 +409,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
409
409
|
translations: itemLabels['Traffic Generator'],
|
|
410
410
|
description: 'Security tools and attack suites for traffic generation',
|
|
411
411
|
descriptionTranslations: itemDescriptions['Security tools and attack suites for traffic generation'],
|
|
412
|
-
href: 'https://
|
|
412
|
+
href: 'https://f5-sales-demo.github.io/traffic-generator/',
|
|
413
413
|
icon: resolveIcon('f5xc:application-traffic-insight'),
|
|
414
414
|
},
|
|
415
415
|
{
|
|
@@ -417,7 +417,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
417
417
|
translations: itemLabels['CDN Simulator'],
|
|
418
418
|
description: 'NGINX-based CDN edge node simulator',
|
|
419
419
|
descriptionTranslations: itemDescriptions['NGINX-based CDN edge node simulator'],
|
|
420
|
-
href: 'https://
|
|
420
|
+
href: 'https://f5-sales-demo.github.io/cdn-simulator/',
|
|
421
421
|
icon: resolveIcon('f5xc:content-delivery-network'),
|
|
422
422
|
},
|
|
423
423
|
],
|
|
@@ -426,7 +426,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
426
426
|
footer: {
|
|
427
427
|
label: 'View All Components',
|
|
428
428
|
translations: footerLabels['View All Components'],
|
|
429
|
-
href: 'https://
|
|
429
|
+
href: 'https://f5-sales-demo.github.io/demo-resources/',
|
|
430
430
|
description: 'Browse the full demo resource catalog',
|
|
431
431
|
descriptionTranslations: footerDescriptions['Browse the full demo resource catalog'],
|
|
432
432
|
},
|
|
@@ -486,7 +486,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
486
486
|
translations: itemLabels['VS Code Extension'],
|
|
487
487
|
description: 'Manage F5 XC resources from VS Code',
|
|
488
488
|
descriptionTranslations: itemDescriptions['Manage F5 XC resources from VS Code'],
|
|
489
|
-
href: 'https://
|
|
489
|
+
href: 'https://f5-sales-demo.github.io/vscode-f5xc-tools/',
|
|
490
490
|
icon: resolveIcon('carbon:code'),
|
|
491
491
|
},
|
|
492
492
|
{
|
|
@@ -494,7 +494,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
494
494
|
translations: itemLabels['xcsh CLI'],
|
|
495
495
|
description: 'AI-powered CLI for F5 XC',
|
|
496
496
|
descriptionTranslations: itemDescriptions['AI-powered CLI for F5 XC'],
|
|
497
|
-
href: 'https://
|
|
497
|
+
href: 'https://f5-sales-demo.github.io/xcsh/',
|
|
498
498
|
icon: resolveIcon('carbon:terminal'),
|
|
499
499
|
},
|
|
500
500
|
{
|
|
@@ -502,7 +502,7 @@ const defaultMegaMenuItems: MegaMenuItem[] = [
|
|
|
502
502
|
translations: itemLabels['xcsh Chrome Extension'],
|
|
503
503
|
description: 'Drive the F5 XC console with xcsh',
|
|
504
504
|
descriptionTranslations: itemDescriptions['Drive the F5 XC console with xcsh'],
|
|
505
|
-
href: 'https://
|
|
505
|
+
href: 'https://f5-sales-demo.github.io/xcsh-chrome-extension/',
|
|
506
506
|
icon: resolveIcon('carbon:application-web'),
|
|
507
507
|
},
|
|
508
508
|
],
|
|
@@ -520,15 +520,15 @@ const defaultHead: HeadEntry[] = [
|
|
|
520
520
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
|
521
521
|
|
|
522
522
|
mermaid.registerIconPacks([
|
|
523
|
-
{ name: 'hashicorp-flight', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
524
|
-
{ name: 'f5-brand', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
525
|
-
{ name: 'f5xc', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
526
|
-
{ name: 'carbon', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
527
|
-
{ name: 'lucide', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
528
|
-
{ name: 'mdi', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
529
|
-
{ name: 'phosphor', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
530
|
-
{ name: 'tabler', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
531
|
-
{ name: 'azure', loader: () => fetch('https://cdn.jsdelivr.net/npm/@
|
|
523
|
+
{ name: 'hashicorp-flight', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-hashicorp-flight/icons.json').then(r => r.json()) },
|
|
524
|
+
{ name: 'f5-brand', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-f5-brand/icons.json').then(r => r.json()) },
|
|
525
|
+
{ name: 'f5xc', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-f5xc/icons.json').then(r => r.json()) },
|
|
526
|
+
{ name: 'carbon', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-carbon/icons.json').then(r => r.json()) },
|
|
527
|
+
{ name: 'lucide', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-lucide/icons.json').then(r => r.json()) },
|
|
528
|
+
{ name: 'mdi', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-mdi/icons.json').then(r => r.json()) },
|
|
529
|
+
{ name: 'phosphor', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-phosphor/icons.json').then(r => r.json()) },
|
|
530
|
+
{ name: 'tabler', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-tabler/icons.json').then(r => r.json()) },
|
|
531
|
+
{ name: 'azure', loader: () => fetch('https://cdn.jsdelivr.net/npm/@f5-sales-demo/icons-azure/icons.json').then(r => r.json()) },
|
|
532
532
|
]);
|
|
533
533
|
|
|
534
534
|
mermaid.initialize({
|
|
@@ -587,7 +587,7 @@ const federatedSearchSites = [
|
|
|
587
587
|
];
|
|
588
588
|
|
|
589
589
|
export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
|
|
590
|
-
const site = options.site || process.env.DOCS_SITE || 'https://
|
|
590
|
+
const site = options.site || process.env.DOCS_SITE || 'https://f5-sales-demo.github.io';
|
|
591
591
|
const base = options.base || process.env.DOCS_BASE || '/';
|
|
592
592
|
const title = options.title || process.env.DOCS_TITLE || 'Documentation';
|
|
593
593
|
const description = options.description || process.env.DOCS_DESCRIPTION || '';
|
|
@@ -634,7 +634,7 @@ export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
|
|
|
634
634
|
}
|
|
635
635
|
const megaMenuItems = options.megaMenuItems || defaultMegaMenuItems;
|
|
636
636
|
const head = options.head || defaultHead;
|
|
637
|
-
const logo = options.logo || { src: '@
|
|
637
|
+
const logo = options.logo || { src: '@f5-sales-demo/docs-theme/assets/f5-distributed-cloud.svg' };
|
|
638
638
|
const additionalRemarkPlugins = options.additionalRemarkPlugins || [];
|
|
639
639
|
const additionalIntegrations = options.additionalIntegrations || [];
|
|
640
640
|
|
package/index.ts
CHANGED
|
@@ -3,30 +3,30 @@ import { translations } from './src/i18n/translations.ts';
|
|
|
3
3
|
|
|
4
4
|
export default function f5xcDocsTheme(): StarlightPlugin {
|
|
5
5
|
return {
|
|
6
|
-
name: '@
|
|
6
|
+
name: '@f5-sales-demo/docs-theme',
|
|
7
7
|
hooks: {
|
|
8
8
|
'i18n:setup'({ injectTranslations }) {
|
|
9
9
|
injectTranslations(translations);
|
|
10
10
|
},
|
|
11
11
|
'config:setup'({ config, updateConfig, addRouteMiddleware, logger }) {
|
|
12
12
|
addRouteMiddleware({
|
|
13
|
-
entrypoint: '@
|
|
13
|
+
entrypoint: '@f5-sales-demo/docs-theme/route-middleware',
|
|
14
14
|
order: 'pre',
|
|
15
15
|
});
|
|
16
16
|
updateConfig({
|
|
17
17
|
customCss: [
|
|
18
18
|
...(config.customCss ?? []),
|
|
19
|
-
'@
|
|
20
|
-
'@
|
|
19
|
+
'@f5-sales-demo/docs-theme/fonts/font-face.css',
|
|
20
|
+
'@f5-sales-demo/docs-theme/styles/custom.css',
|
|
21
21
|
],
|
|
22
22
|
components: {
|
|
23
23
|
...config.components,
|
|
24
|
-
Banner: '@
|
|
25
|
-
EditLink: '@
|
|
26
|
-
Footer: '@
|
|
27
|
-
SiteTitle: '@
|
|
24
|
+
Banner: '@f5-sales-demo/docs-theme/components/Banner.astro',
|
|
25
|
+
EditLink: '@f5-sales-demo/docs-theme/components/EditLink.astro',
|
|
26
|
+
Footer: '@f5-sales-demo/docs-theme/components/Footer.astro',
|
|
27
|
+
SiteTitle: '@f5-sales-demo/docs-theme/components/SiteTitle.astro',
|
|
28
28
|
MarkdownContent:
|
|
29
|
-
process.env.DOCS_MARKDOWN_CONTENT || '@
|
|
29
|
+
process.env.DOCS_MARKDOWN_CONTENT || '@f5-sales-demo/docs-theme/components/MarkdownContent.astro',
|
|
30
30
|
},
|
|
31
31
|
});
|
|
32
32
|
logger.info('F5 XC docs theme loaded');
|
package/package.json
CHANGED
package/src/i18n/locales.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_LOCALE, type StarlightLocaleConfig, toStarlightLocales } from '@
|
|
1
|
+
import { DEFAULT_LOCALE, type StarlightLocaleConfig, toStarlightLocales } from '@f5-sales-demo/i18n-core';
|
|
2
2
|
|
|
3
3
|
export type LocaleConfig = StarlightLocaleConfig;
|
|
4
4
|
|
|
@@ -21,13 +21,13 @@ describe('langToSlug', () => {
|
|
|
21
21
|
|
|
22
22
|
describe('localizeEcosystemHref', () => {
|
|
23
23
|
it('injects locale slug into ecosystem URLs', () => {
|
|
24
|
-
const result = localizeEcosystemHref('https://
|
|
25
|
-
expect(result).toBe('https://
|
|
24
|
+
const result = localizeEcosystemHref('https://f5-sales-demo.github.io/waf/', 'fr');
|
|
25
|
+
expect(result).toBe('https://f5-sales-demo.github.io/waf/fr/');
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
it('does not double-inject if locale already present', () => {
|
|
29
|
-
const result = localizeEcosystemHref('https://
|
|
30
|
-
expect(result).toBe('https://
|
|
29
|
+
const result = localizeEcosystemHref('https://f5-sales-demo.github.io/waf/fr/', 'fr');
|
|
30
|
+
expect(result).toBe('https://f5-sales-demo.github.io/waf/fr/');
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
it('returns href unchanged for non-ecosystem hosts', () => {
|
|
@@ -36,13 +36,13 @@ describe('localizeEcosystemHref', () => {
|
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
it('returns href unchanged for invalid locale slug', () => {
|
|
39
|
-
const result = localizeEcosystemHref('https://
|
|
40
|
-
expect(result).toBe('https://
|
|
39
|
+
const result = localizeEcosystemHref('https://f5-sales-demo.github.io/waf/', 'xx-invalid');
|
|
40
|
+
expect(result).toBe('https://f5-sales-demo.github.io/waf/');
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
it('returns href unchanged for empty locale', () => {
|
|
44
|
-
const result = localizeEcosystemHref('https://
|
|
45
|
-
expect(result).toBe('https://
|
|
44
|
+
const result = localizeEcosystemHref('https://f5-sales-demo.github.io/waf/', '');
|
|
45
|
+
expect(result).toBe('https://f5-sales-demo.github.io/waf/');
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
it('returns invalid URLs unchanged', () => {
|
|
@@ -53,7 +53,7 @@ describe('localizeEcosystemHref', () => {
|
|
|
53
53
|
it('works with all 13 supported locale slugs', () => {
|
|
54
54
|
const slugs = ['en', 'fr', 'es', 'de', 'pt-br', 'ja', 'ko', 'zh-cn', 'zh-tw', 'ar', 'it', 'hi', 'th'];
|
|
55
55
|
for (const slug of slugs) {
|
|
56
|
-
const result = localizeEcosystemHref('https://
|
|
56
|
+
const result = localizeEcosystemHref('https://f5-sales-demo.github.io/waf/', slug);
|
|
57
57
|
expect(result).toContain(`/${slug}/`);
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bcp47ToSlug, VALID_SLUGS } from '@
|
|
1
|
+
import { bcp47ToSlug, VALID_SLUGS } from '@f5-sales-demo/i18n-core';
|
|
2
2
|
|
|
3
|
-
const ECOSYSTEM_HOST = '
|
|
3
|
+
const ECOSYSTEM_HOST = 'f5-sales-demo.github.io';
|
|
4
4
|
|
|
5
5
|
export const langToSlug = bcp47ToSlug;
|
|
6
6
|
|
|
@@ -43,13 +43,13 @@ export function resolveIcon(name: string): string {
|
|
|
43
43
|
iconData = require('@iconify-json/tabler/icons.json');
|
|
44
44
|
break;
|
|
45
45
|
case 'f5-brand':
|
|
46
|
-
iconData = require('@
|
|
46
|
+
iconData = require('@f5-sales-demo/icons-f5-brand/icons.json');
|
|
47
47
|
break;
|
|
48
48
|
case 'f5xc':
|
|
49
|
-
iconData = require('@
|
|
49
|
+
iconData = require('@f5-sales-demo/icons-f5xc/icons.json');
|
|
50
50
|
break;
|
|
51
51
|
case 'hashicorp-flight':
|
|
52
|
-
iconData = require('@
|
|
52
|
+
iconData = require('@f5-sales-demo/icons-hashicorp-flight/icons.json');
|
|
53
53
|
break;
|
|
54
54
|
default:
|
|
55
55
|
throw new Error(
|