@f5-sales-demo/docs-theme 4.4.0 → 4.4.2

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.
@@ -5,7 +5,7 @@ import Icon from './Icon.astro';
5
5
 
6
6
  <Default {...Astro.props}><slot /></Default>
7
7
 
8
- <div class="social-links">
8
+ {process.env.DOCS_PROFILE !== 'canonical-provider' && <div class="social-links">
9
9
  <a href="https://www.facebook.com/f5incorporated" target="_blank" rel="noopener noreferrer" aria-label="Facebook">
10
10
  <Icon name="hashicorp-flight:facebook-color" size="1.5rem" />
11
11
  </a>
@@ -21,7 +21,7 @@ import Icon from './Icon.astro';
21
21
  <a href="https://www.youtube.com/user/f5networksinc" target="_blank" rel="noopener noreferrer" aria-label="YouTube">
22
22
  <Icon name="hashicorp-flight:youtube-color" size="1.5rem" />
23
23
  </a>
24
- </div>
24
+ </div>}
25
25
 
26
26
  <style>
27
27
  .social-links {
@@ -7,7 +7,5 @@ import ImageZoom from 'starlight-image-zoom/components/ImageZoom.astro';
7
7
  import StarlightVideosMarkdownContent from 'starlight-videos/components/MarkdownContent.astro';
8
8
  ---
9
9
 
10
- <ImageZoom />
11
- <StarlightVideosMarkdownContent>
12
- {canonical ? <ProviderReference><slot /></ProviderReference> : <slot />}
13
- </StarlightVideosMarkdownContent>
10
+ {!canonical && <ImageZoom />}
11
+ {canonical ? <div class="sl-markdown-content"><ProviderReference><slot /></ProviderReference></div> : <StarlightVideosMarkdownContent><slot /></StarlightVideosMarkdownContent>}
package/config.ts CHANGED
@@ -712,7 +712,7 @@ export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
712
712
  }
713
713
  }
714
714
  const megaMenuItems = options.megaMenuItems || (canonicalProvider ? providerMegaMenu(base) : defaultMegaMenuItems);
715
- const head = options.head || defaultHead;
715
+ const head = options.head || (canonicalProvider ? [] : defaultHead);
716
716
  const logo = options.logo || { src: '@f5-sales-demo/docs-theme/assets/f5-distributed-cloud.svg' };
717
717
  const additionalRemarkPlugins = options.additionalRemarkPlugins || [];
718
718
  const additionalIntegrations = options.additionalIntegrations || [];
@@ -774,8 +774,7 @@ export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
774
774
  progressRingColor: '#e4002b',
775
775
  showOnHomepage: false,
776
776
  }),
777
- starlightHeadingBadges(),
778
- starlightPageActions(),
777
+ ...(!canonicalProvider ? [starlightHeadingBadges(), starlightPageActions()] : []),
779
778
  starlightIconsPlugin(),
780
779
  ...(openAPISpecs.length > 0
781
780
  ? [
@@ -870,7 +869,10 @@ export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
870
869
  site,
871
870
  base,
872
871
  ...(canonicalProvider
873
- ? { experimental: { collectionStorage: { type: 'chunked' as const, chunkSize: 1024 * 1024 } } }
872
+ ? {
873
+ experimental: { collectionStorage: { type: 'chunked' as const, chunkSize: 1024 * 1024 } },
874
+ vite: { build: { assetsInlineLimit: 0 } },
875
+ }
874
876
  : {}),
875
877
  ...(resolvedLocales ? { redirects: { '/': `${normalizedBase}/${resolvedDefaultLocale}/` } } : {}),
876
878
  markdown: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f5-sales-demo/docs-theme",
3
- "version": "4.4.0",
3
+ "version": "4.4.2",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "engines": {
@@ -28,3 +28,21 @@ describe('canonical provider navigation', () => {
28
28
  expect(nav[0].entries[1].isCurrent).toBe(true);
29
29
  });
30
30
  });
31
+
32
+ describe('bounded collection expansion', () => {
33
+ it('keeps sibling references and expands only the exact active ancestry', () => {
34
+ const pages = [
35
+ { id: 'root', collection_id: 'c', parent_id: null, title: 'Root', slug: 'resources/demo' },
36
+ { id: 'a', collection_id: 'c', parent_id: 'root', title: 'A', slug: 'resources/demo/properties/a' },
37
+ { id: 'aa', collection_id: 'c', parent_id: 'a', title: 'AA', slug: 'resources/demo/properties/a/child' },
38
+ { id: 'b', collection_id: 'c', parent_id: 'root', title: 'B', slug: 'resources/demo/properties/ab' },
39
+ { id: 'bb', collection_id: 'c', parent_id: 'b', title: 'BB', slug: 'resources/demo/properties/ab/child' },
40
+ ];
41
+ const nav = collectionNavigation(pages, 'c', '/', 'resources/demo/properties/a/child');
42
+ const text = JSON.stringify(nav);
43
+ expect(text).toContain('AA');
44
+ expect(text).toContain('"label":"B"');
45
+ expect(text).not.toContain('BB');
46
+ expect(nav[0].type).toBe('group');
47
+ });
48
+ });
@@ -39,7 +39,9 @@ export function collectionNavigation(pages: ProviderPage[], collection: string,
39
39
  const tree = (page: ProviderPage, seen = new Set<string>()): StarlightRouteData['sidebar'][number] => {
40
40
  if (seen.has(page.id)) throw new Error(`Cyclic canonical navigation: ${page.id}`);
41
41
  const descendants = children.get(page.id) || [];
42
- if (!descendants.length) return link(page);
42
+ // Other branches remain navigable through their reference page, whose
43
+ // content lists every direct child. Expand only the active ancestry.
44
+ if (!descendants.length || !(current === page.slug || current.startsWith(`${page.slug}/`))) return link(page);
43
45
  const next = new Set([...seen, page.id]);
44
46
  return {
45
47
  type: 'group',