@f5-sales-demo/docs-theme 3.9.9 → 3.9.11
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/config.ts
CHANGED
|
@@ -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://f5-sales-demo.github.io/terraform-provider-
|
|
318
|
+
href: 'https://f5-sales-demo.github.io/terraform-provider-xcsh/',
|
|
319
319
|
icon: resolveIcon('hashicorp-flight:terraform-color'),
|
|
320
320
|
},
|
|
321
321
|
{
|
|
@@ -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://f5-sales-demo.github.io/vscode-
|
|
489
|
+
href: 'https://f5-sales-demo.github.io/vscode-xcsh/',
|
|
490
490
|
icon: resolveIcon('carbon:code'),
|
|
491
491
|
},
|
|
492
492
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@f5-sales-demo/docs-theme",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.11",
|
|
4
4
|
"description": "F5 Distributed Cloud branded Starlight documentation theme",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"dependencies": {
|
|
118
|
-
"@anthropic-ai/sdk": "^0.
|
|
118
|
+
"@anthropic-ai/sdk": "^0.112.1",
|
|
119
119
|
"@astrojs/react": "^6.0.0",
|
|
120
120
|
"@f5-sales-demo/i18n-core": "^1.0.0",
|
|
121
121
|
"@f5-sales-demo/starlight-llms-txt": "1.3.1",
|
|
@@ -62,4 +62,14 @@ describe('localizeEcosystemHref', () => {
|
|
|
62
62
|
const result = localizeEcosystemHref('https://custom.host.io/waf/', 'fr', 'custom.host.io');
|
|
63
63
|
expect(result).toBe('https://custom.host.io/waf/fr/');
|
|
64
64
|
});
|
|
65
|
+
|
|
66
|
+
it('does not localize single-locale ecosystem sites (would 404)', () => {
|
|
67
|
+
// These sites have no /<locale>/ path; injecting one produces a 404.
|
|
68
|
+
expect(localizeEcosystemHref('https://f5-sales-demo.github.io/terraform-provider-xcsh/', 'fr')).toBe(
|
|
69
|
+
'https://f5-sales-demo.github.io/terraform-provider-xcsh/',
|
|
70
|
+
);
|
|
71
|
+
expect(localizeEcosystemHref('https://f5-sales-demo.github.io/docs-control/', 'ja')).toBe(
|
|
72
|
+
'https://f5-sales-demo.github.io/docs-control/',
|
|
73
|
+
);
|
|
74
|
+
});
|
|
65
75
|
});
|
|
@@ -2,6 +2,11 @@ import { bcp47ToSlug, VALID_SLUGS } from '@f5-sales-demo/i18n-core';
|
|
|
2
2
|
|
|
3
3
|
const ECOSYSTEM_HOST = 'f5-sales-demo.github.io';
|
|
4
4
|
|
|
5
|
+
// Ecosystem sites published as a single locale (no `/<locale>/` path segment).
|
|
6
|
+
// Injecting a locale slug into links to these produces a 404
|
|
7
|
+
// (e.g. `/terraform-provider-xcsh/en/`), so they are left unlocalized.
|
|
8
|
+
const NON_LOCALIZED_ECOSYSTEM_SLUGS = new Set(['terraform-provider-xcsh', 'docs-control']);
|
|
9
|
+
|
|
5
10
|
export const langToSlug = bcp47ToSlug;
|
|
6
11
|
|
|
7
12
|
export function localizeEcosystemHref(
|
|
@@ -23,6 +28,8 @@ export function localizeEcosystemHref(
|
|
|
23
28
|
const segments = url.pathname.split('/').filter(Boolean);
|
|
24
29
|
if (segments.length === 0) return href;
|
|
25
30
|
|
|
31
|
+
if (NON_LOCALIZED_ECOSYSTEM_SLUGS.has(segments[0])) return href;
|
|
32
|
+
|
|
26
33
|
if (segments.length >= 2 && VALID_SLUGS.has(segments[1])) {
|
|
27
34
|
return href;
|
|
28
35
|
}
|
|
@@ -53,9 +53,9 @@ function collectMarkdownFiles(dir: string): string[] {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Clean a page_title to match Terraform Registry sidebar labels.
|
|
56
|
-
* Resources: "f5xc_http_loadbalancer Resource - terraform-provider-
|
|
57
|
-
* Data Sources: "f5xc_http_loadbalancer Data Source - terraform-provider-
|
|
58
|
-
* Functions: "blindfold function - terraform-provider-
|
|
56
|
+
* Resources: "f5xc_http_loadbalancer Resource - terraform-provider-xcsh" → "f5xc_http_loadbalancer"
|
|
57
|
+
* Data Sources: "f5xc_http_loadbalancer Data Source - terraform-provider-xcsh" → "f5xc_http_loadbalancer"
|
|
58
|
+
* Functions: "blindfold function - terraform-provider-xcsh" → "blindfold"
|
|
59
59
|
* Guides: "Guide: HTTP Load Balancer with Security Features" → "HTTP Load Balancer with Security Features"
|
|
60
60
|
*/
|
|
61
61
|
function cleanPageTitle(pageTitle: string, docType: DocType): string {
|