@f5xc-salesdemos/docs-theme 2.0.2 → 2.0.3

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # XC Docs Theme
2
2
 
3
3
  [![GitHub Pages Deploy](https://github.com/f5xc-salesdemos/docs-theme/actions/workflows/github-pages-deploy.yml/badge.svg)](https://github.com/f5xc-salesdemos/docs-theme/actions/workflows/github-pages-deploy.yml)
4
- [![Repo Settings](https://github.com/f5xc-salesdemos/docs-theme/actions/workflows/enforce-repo-settings.yml/badge.svg)](https://github.com/f5xc-salesdemos/docs-theme/actions/workflows/enforce-repo-settings.yml)
4
+ [![Repository Settings](https://github.com/f5xc-salesdemos/docs-theme/actions/workflows/enforce-repo-settings.yml/badge.svg)](https://github.com/f5xc-salesdemos/docs-theme/actions/workflows/enforce-repo-settings.yml)
5
5
  [![License](https://img.shields.io/github/license/f5xc-salesdemos/docs-theme)](LICENSE)
6
6
 
7
7
  Shared branding and styling for F5 Distributed Cloud documentation sites
@@ -21,9 +21,7 @@ function findTrail(entries: typeof sidebar, trail: { label: string }[] = []): {
21
21
  }
22
22
 
23
23
  const trail = findTrail(sidebar) || [];
24
- const fixedEditUrl = editUrl
25
- ? editUrl.href.replace('/src/content/docs/', '/docs/')
26
- : undefined;
24
+ const fixedEditUrl = editUrl ? editUrl.href.replace('/src/content/docs/', '/docs/') : undefined;
27
25
  ---
28
26
 
29
27
  <Default {...Astro.props}><slot /></Default>
@@ -49,7 +49,7 @@ if (isScoped) {
49
49
  break;
50
50
  default:
51
51
  throw new Error(
52
- `Unknown icon prefix "${prefix}". Available: lucide, carbon, mdi, phosphor, tabler, f5-brand, f5xc, hashicorp-flight`
52
+ `Unknown icon prefix "${prefix}". Available: lucide, carbon, mdi, phosphor, tabler, f5-brand, f5xc, hashicorp-flight`,
53
53
  );
54
54
  }
55
55
 
@@ -66,9 +66,7 @@ if (isScoped) {
66
66
 
67
67
  const isPalette = isScoped && (iconData?.info?.palette === true || hasExplicitColors(svgBody));
68
68
 
69
- const a11yAttrs = label
70
- ? { 'aria-label': label }
71
- : { 'aria-hidden': 'true' };
69
+ const a11yAttrs = label ? { 'aria-label': label } : { 'aria-hidden': 'true' };
72
70
 
73
71
  const styleParts: string[] = [];
74
72
  if (color) styleParts.push(`--sl-icon-color: ${color}`);
@@ -1,6 +1,6 @@
1
1
  ---
2
- import StarlightVideosMarkdownContent from 'starlight-videos/components/MarkdownContent.astro'
3
- import ImageZoom from 'starlight-image-zoom/components/ImageZoom.astro'
2
+ import StarlightVideosMarkdownContent from 'starlight-videos/components/MarkdownContent.astro';
3
+ import ImageZoom from 'starlight-image-zoom/components/ImageZoom.astro';
4
4
  ---
5
5
 
6
6
  <ImageZoom />
package/config.ts CHANGED
@@ -321,8 +321,8 @@ export function createF5xcDocsConfig(options: F5xcDocsConfigOptions = {}) {
321
321
  const title = options.title || process.env.DOCS_TITLE || 'Documentation';
322
322
  const description = options.description || process.env.DOCS_DESCRIPTION || '';
323
323
  const githubRepository = options.githubRepository || process.env.GITHUB_REPOSITORY || '';
324
- const llmsOptionalLinks = options.llmsOptionalLinks
325
- || (process.env.LLMS_OPTIONAL_LINKS ? JSON.parse(process.env.LLMS_OPTIONAL_LINKS) : []);
324
+ const llmsOptionalLinks =
325
+ options.llmsOptionalLinks || (process.env.LLMS_OPTIONAL_LINKS ? JSON.parse(process.env.LLMS_OPTIONAL_LINKS) : []);
326
326
  const megaMenuItems = options.megaMenuItems || defaultMegaMenuItems;
327
327
  const head = options.head || defaultHead;
328
328
  const logo = options.logo || { src: '@f5xc-salesdemos/docs-theme/assets/f5-distributed-cloud.svg' };
package/index.ts CHANGED
@@ -21,8 +21,8 @@ export default function f5xcDocsTheme(): StarlightPlugin {
21
21
  EditLink: '@f5xc-salesdemos/docs-theme/components/EditLink.astro',
22
22
  Footer: '@f5xc-salesdemos/docs-theme/components/Footer.astro',
23
23
  SiteTitle: '@f5xc-salesdemos/docs-theme/components/SiteTitle.astro',
24
- MarkdownContent: process.env.DOCS_MARKDOWN_CONTENT
25
- || '@f5xc-salesdemos/docs-theme/components/MarkdownContent.astro',
24
+ MarkdownContent:
25
+ process.env.DOCS_MARKDOWN_CONTENT || '@f5xc-salesdemos/docs-theme/components/MarkdownContent.astro',
26
26
  },
27
27
  });
28
28
  logger.info('F5 XC docs theme loaded');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f5xc-salesdemos/docs-theme",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,22 +20,14 @@ function hrefToSlug(href: string): string {
20
20
 
21
21
  // Discover all index pages at build time via Vite glob — no astro:content needed
22
22
  const indexPaths = Object.keys(
23
- import.meta.glob(
24
- ['/src/content/docs/**/index.md', '/src/content/docs/**/index.mdx'],
25
- { eager: false }
26
- )
23
+ import.meta.glob(['/src/content/docs/**/index.md', '/src/content/docs/**/index.mdx'], { eager: false }),
27
24
  );
28
25
 
29
26
  const indexSlugs = new Set<string>(
30
- indexPaths.map((p) =>
31
- p.replace(/^\/src\/content\/docs\//, '').replace(/\/?index\.mdx?$/, '')
32
- )
27
+ indexPaths.map((p) => p.replace(/^\/src\/content\/docs\//, '').replace(/\/?index\.mdx?$/, '')),
33
28
  );
34
29
 
35
- function filterIndexPages(
36
- entries: SidebarEntry[],
37
- slugs: Set<string>
38
- ): SidebarEntry[] {
30
+ function filterIndexPages(entries: SidebarEntry[], slugs: Set<string>): SidebarEntry[] {
39
31
  return entries.reduce<SidebarEntry[]>((acc, entry) => {
40
32
  if (entry.type === 'link') {
41
33
  const slug = hrefToSlug(entry.href);
@@ -8,7 +8,7 @@ const require = createRequire(import.meta.url);
8
8
  */
9
9
  export function hasExplicitColors(body: string): boolean {
10
10
  const fills = body.match(/fill="([^"]*)"/g) || [];
11
- return fills.some(f => f !== 'fill="none"' && f !== 'fill="currentColor"');
11
+ return fills.some((f) => f !== 'fill="none"' && f !== 'fill="currentColor"');
12
12
  }
13
13
 
14
14
  /**
@@ -52,7 +52,7 @@ export function resolveIcon(name: string): string {
52
52
  break;
53
53
  default:
54
54
  throw new Error(
55
- `Unknown icon prefix "${prefix}". Available: lucide, carbon, mdi, phosphor, tabler, f5-brand, f5xc, hashicorp-flight`
55
+ `Unknown icon prefix "${prefix}". Available: lucide, carbon, mdi, phosphor, tabler, f5-brand, f5xc, hashicorp-flight`,
56
56
  );
57
57
  }
58
58