@f5-sales-demo/docs-theme 4.2.0 → 4.3.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.
@@ -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://f5-sales-demo.github.io/docs/';
4
+ const docsHome = process.env.DOCS_HOME || 'https://f5-sales-demo.github.io/';
5
5
  const { sidebar, entry, siteTitle, editUrl } = Astro.locals.starlightRoute;
6
6
  const t = Astro.locals.t;
7
7
 
@@ -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://f5-sales-demo.github.io/docs/';
5
+ const docsHome = process.env.DOCS_HOME || 'https://f5-sales-demo.github.io/';
6
6
  const { siteTitle } = Astro.locals.starlightRoute;
7
7
  ---
8
8
 
package/config.ts CHANGED
@@ -308,6 +308,12 @@ export const defaultMegaMenuItems: MegaMenuItem[] = [
308
308
  title: 'Documentation Tools',
309
309
  translations: categoryTitles['Documentation Tools'],
310
310
  items: [
311
+ {
312
+ label: 'F5 XC Docs',
313
+ description: 'Organization documentation portal',
314
+ href: 'https://f5-sales-demo.github.io/',
315
+ icon: resolveMegaMenuIcon('f5xc:doc'),
316
+ },
311
317
  {
312
318
  label: 'Docs Builder',
313
319
  translations: itemLabels['Docs Builder'],
@@ -603,10 +609,19 @@ mermaid.initialize({
603
609
  },
604
610
  ];
605
611
 
612
+ export function federatedSearchBundlePaths(site: string, base: string): string[] {
613
+ const normalizedBase = base.replace(/\/+$/, '');
614
+ return federatedSearchSites
615
+ .filter((entry) => (entry.repo === 'f5-sales-demo.github.io' ? '' : `/${entry.repo}`) !== normalizedBase)
616
+ .map((entry) =>
617
+ entry.repo === 'f5-sales-demo.github.io' ? `${site}/pagefind/` : `${site}/${entry.repo}/pagefind/`,
618
+ );
619
+ }
620
+
606
621
  export const federatedSearchSites = [
607
622
  { repo: 'docs-builder', label: 'Docs Builder' },
608
623
  { repo: 'docs-theme', label: 'Docs Theme' },
609
- { repo: 'docs', label: 'F5 XC Docs' },
624
+ { repo: 'f5-sales-demo.github.io', label: 'F5 XC Docs' },
610
625
  { repo: 'administration', label: 'Administration' },
611
626
  { repo: 'nginx', label: 'NGINX' },
612
627
  { repo: 'observability', label: 'Observability' },
@@ -713,11 +728,7 @@ export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
713
728
  }
714
729
  : undefined);
715
730
  const mergeIndex = federatedSearch
716
- ? federatedSearchSites
717
- .filter((s) => `/${s.repo}` !== normalizedBase)
718
- .map((s) => ({
719
- bundlePath: `${site}/${s.repo}/pagefind/`,
720
- }))
731
+ ? federatedSearchBundlePaths(site, base).map((bundlePath) => ({ bundlePath }))
721
732
  : undefined;
722
733
 
723
734
  const starlightPlugins: StarlightPlugin[] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f5-sales-demo/docs-theme",
3
- "version": "4.2.0",
3
+ "version": "4.3.1",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "engines": {