@f5-sales-demo/docs-theme 4.9.9 → 4.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f5-sales-demo/docs-theme",
3
- "version": "4.9.9",
3
+ "version": "4.10.0",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "engines": {
@@ -57,3 +57,50 @@ describe('publication profile sidebar', () => {
57
57
  expect(publicationSidebar('f5-sales-demo/canada', fallback)).not.toBe(fallback);
58
58
  });
59
59
  });
60
+
61
+ describe('Statistics publication', () => {
62
+ it('keeps English publication and the existing F5 branding', () => {
63
+ expect(repositoryPublicationProfile('f5-sales-demo/statistics')).toMatchObject({
64
+ locales: { en: { label: 'English', lang: 'en' } },
65
+ defaultLocale: 'en',
66
+ });
67
+ expect(repositoryPublicationProfile('statistics')?.favicon).toBeUndefined();
68
+ });
69
+ it('places all 13 existing routes once in reading order with infrastructure last', () => {
70
+ const sidebar = publicationSidebar('f5-sales-demo/statistics', []);
71
+ expect(sidebar?.slice(0, 11)).toEqual([
72
+ { slug: 'index' },
73
+ { slug: 'access-logs' },
74
+ { slug: 'service-graph' },
75
+ { slug: 'origin-performance' },
76
+ { slug: 'application-health' },
77
+ { slug: 'api-discovery' },
78
+ { slug: 'firewall-metrics' },
79
+ { slug: 'security-events' },
80
+ { slug: 'troubleshooting' },
81
+ { slug: 'api-catalog' },
82
+ { slug: 'setup' },
83
+ ]);
84
+ expect(sidebar?.[11]).toEqual({
85
+ label: 'Infrastructure',
86
+ collapsed: true,
87
+ items: [{ slug: 'deployment' }, { slug: 'verification' }],
88
+ });
89
+ expect(sidebar).toHaveLength(12);
90
+ const routes = sidebar?.flatMap((item) =>
91
+ 'slug' in item
92
+ ? [item.slug]
93
+ : 'items' in item
94
+ ? item.items.map((child) => ('slug' in child ? child.slug : ''))
95
+ : [],
96
+ );
97
+ expect(routes).toHaveLength(13);
98
+ expect(new Set(routes).size).toBe(13);
99
+ });
100
+ it('preserves supplied fallback navigation for other repositories', () => {
101
+ const fallback = [{ slug: 'index' }, { label: 'Existing', items: [{ slug: 'existing' }] }];
102
+ for (const repo of ['observability', 'multi-cloud-networking', 'docs-theme', 'statistics-extra']) {
103
+ expect(publicationSidebar(`f5-sales-demo/${repo}`, fallback)).toBe(fallback);
104
+ }
105
+ });
106
+ });
@@ -5,12 +5,34 @@ type Sidebar = NonNullable<Parameters<typeof starlight>[0]['sidebar']>;
5
5
  interface PublicationProfile {
6
6
  locales: Record<string, { label: string; lang: string }>;
7
7
  defaultLocale: string;
8
- favicon: string;
8
+ favicon?: string;
9
9
  sidebar?: Sidebar;
10
10
  }
11
11
 
12
12
  /** Repository publication decisions shared by navigation and site configuration. */
13
13
  export const publicationProfiles: Record<string, PublicationProfile> = {
14
+ statistics: {
15
+ locales: { en: { label: 'English', lang: 'en' } },
16
+ defaultLocale: 'en',
17
+ sidebar: [
18
+ { slug: 'index' },
19
+ { slug: 'access-logs' },
20
+ { slug: 'service-graph' },
21
+ { slug: 'origin-performance' },
22
+ { slug: 'application-health' },
23
+ { slug: 'api-discovery' },
24
+ { slug: 'firewall-metrics' },
25
+ { slug: 'security-events' },
26
+ { slug: 'troubleshooting' },
27
+ { slug: 'api-catalog' },
28
+ { slug: 'setup' },
29
+ {
30
+ label: 'Infrastructure',
31
+ collapsed: true,
32
+ items: [{ slug: 'deployment' }, { slug: 'verification' }],
33
+ },
34
+ ],
35
+ },
14
36
  canada: {
15
37
  locales: { en: { label: 'English', lang: 'en' } },
16
38
  defaultLocale: 'en',