igniteui-astro-components 0.0.27 → 0.0.29

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.
Files changed (96) hide show
  1. package/README.md +82 -74
  2. package/package.json +16 -2
  3. package/src/assets/images/anatomy-test.png +0 -0
  4. package/src/components/CopyCode/CopyCode.astro +21 -7
  5. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +33 -21
  6. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +44 -43
  7. package/src/components/DocsBreadcrumb/README.md +10 -14
  8. package/src/components/DocsSidebar/DocsSidebar.astro +47 -45
  9. package/src/components/DocsSidebar/DocsSidebar.scss +120 -122
  10. package/src/components/DocsSidebar/README.md +25 -21
  11. package/src/components/DocsSidebar/SidebarFilterInput.astro +24 -29
  12. package/src/components/DocsSidebar/SidebarFilterInput.scss +90 -89
  13. package/src/components/DocsSidebar/SidebarLabel.astro +35 -26
  14. package/src/components/DocsSidebar/sidebar-filter.ts +93 -56
  15. package/src/components/DocsSubHeader/DocsSubHeader.astro +256 -195
  16. package/src/components/DocsSubHeader/DocsSubHeader.scss +181 -178
  17. package/src/components/DocsSubHeader/README.md +18 -16
  18. package/src/components/DocsToc/DocsToc.astro +301 -280
  19. package/src/components/DocsToc/DocsToc.scss +20 -21
  20. package/src/components/DocsToc/README.md +11 -9
  21. package/src/components/DocsToc/toTreeNodes.ts +3 -8
  22. package/src/components/DocsTree/DocsTree.astro +32 -20
  23. package/src/components/DocsTree/DocsTreeItem.astro +35 -30
  24. package/src/components/DocsTree/README.md +16 -15
  25. package/src/components/DocsTree/docs-tree.scss +267 -268
  26. package/src/components/GlobalFooter/GlobalFooter.astro +10 -10
  27. package/src/components/GlobalFooter/README.md +3 -2
  28. package/src/components/GlobalNavBar/GlobalNavBar.astro +4 -2
  29. package/src/components/GlobalNavBar/GlobalNavBar.module.scss +222 -222
  30. package/src/components/GlobalNavBar/README.md +3 -2
  31. package/src/components/LicenseIndicator/LicenseIndicator.astro +7 -5
  32. package/src/components/LicenseIndicator/LicenseIndicator.scss +3 -3
  33. package/src/components/MobileSidebarToggle/MobileSidebarToggle.astro +16 -17
  34. package/src/components/MobileSidebarToggle/README.md +3 -2
  35. package/src/components/MobileTocToggle/MobileTocToggle.astro +75 -61
  36. package/src/components/MobileTocToggle/MobileTocToggle.scss +65 -59
  37. package/src/components/Search/README.md +1 -0
  38. package/src/components/Search/Search.astro +137 -109
  39. package/src/components/Search/Search.scss +20 -20
  40. package/src/components/SearchAdvanced/README.md +21 -15
  41. package/src/components/SearchAdvanced/SearchAdvanced.astro +205 -133
  42. package/src/components/SearchAdvanced/SearchAdvanced.scss +152 -153
  43. package/src/components/mdx/Anatomy/Anatomy.astro +51 -0
  44. package/src/components/mdx/Anatomy/Anatomy.scss +40 -0
  45. package/src/components/mdx/ApiLink/ApiLink.astro +133 -113
  46. package/src/components/mdx/ApiLink/ApiLink.scss +9 -9
  47. package/src/components/mdx/ApiLink/README.md +26 -22
  48. package/src/components/mdx/ApiLink/api-link-index.ts +196 -173
  49. package/src/components/mdx/ApiRef/ApiRef.astro +54 -51
  50. package/src/components/mdx/ApiRef/README.md +20 -15
  51. package/src/components/mdx/Badge/Badge.astro +14 -14
  52. package/src/components/mdx/Badge/Badge.scss +61 -56
  53. package/src/components/mdx/Badge/README.md +24 -19
  54. package/src/components/mdx/DocsAside/DocsAside.astro +30 -37
  55. package/src/components/mdx/DocsAside/DocsAside.scss +82 -82
  56. package/src/components/mdx/DocsAside/README.md +22 -22
  57. package/src/components/mdx/Faq/Faq.astro +86 -0
  58. package/src/components/mdx/Faq/Faq.scss +105 -0
  59. package/src/components/mdx/Faq/FaqItem.astro +117 -0
  60. package/src/components/mdx/Faq/README.md +223 -0
  61. package/src/components/mdx/Faq/types.ts +34 -0
  62. package/src/components/mdx/PlatformBlock/PlatformBlock.astro +3 -2
  63. package/src/components/mdx/PlatformBlock/README.md +6 -8
  64. package/src/components/mdx/Sample/README.md +21 -16
  65. package/src/components/mdx/Sample/Sample.astro +97 -74
  66. package/src/components/mdx/Sample/Sample.scss +132 -132
  67. package/src/content-helper.ts +71 -72
  68. package/src/content.config.ts +1 -6
  69. package/src/integration.ts +566 -512
  70. package/src/layouts/DocsLayout/DocsLayout.astro +228 -182
  71. package/src/layouts/DocsLayout/DocsLayout.scss +261 -261
  72. package/src/layouts/DocsLayout/README.md +24 -35
  73. package/src/lib/nav-helpers.ts +88 -82
  74. package/src/lib/types.ts +76 -76
  75. package/src/llms.ts +205 -166
  76. package/src/platform.ts +312 -162
  77. package/src/plugins/rehype-heading-anchors.ts +45 -45
  78. package/src/plugins/rehype-pagefind-ignore.ts +19 -19
  79. package/src/plugins/rehype-table-wrapper.ts +30 -30
  80. package/src/plugins/remark-docfx.ts +12 -0
  81. package/src/plugins/remark-env-vars.ts +12 -4
  82. package/src/plugins/remark-md-links.ts +10 -4
  83. package/src/scripts/icon-manifest.ts +13 -5
  84. package/src/scripts/sample-widget.ts +557 -501
  85. package/src/sidebar.ts +103 -97
  86. package/src/styles/global/_code-blocks.scss +43 -44
  87. package/src/styles/global/_component-themes.scss +151 -153
  88. package/src/styles/global/_icon-gallery.scss +81 -81
  89. package/src/styles/global/_index.scss +0 -1
  90. package/src/styles/global/_markdown.scss +816 -787
  91. package/src/styles/global/_palette.scss +456 -110
  92. package/src/styles/global/_search-shared.scss +402 -398
  93. package/src/styles/global/_type-scale.scss +127 -127
  94. package/src/styles/global/_variables.scss +138 -111
  95. package/src/styles/theme.scss +41 -41
  96. package/src/virtual-modules.d.ts +11 -2
package/src/llms.ts CHANGED
@@ -19,20 +19,20 @@ import matter from 'gray-matter';
19
19
 
20
20
  /** LLM-facing metadata for a documentation page, derived from frontmatter. */
21
21
  export interface LlmsMeta {
22
- /** Description shown in llms.txt. Precedence: llms.description > llmsdescription > description */
23
- description?: string;
24
- /** Keyword tags. Precedence: llms.keywords > llmskeywords */
25
- keywords?: string[];
22
+ /** Description shown in llms.txt. Precedence: llms.description > llmsdescription > description */
23
+ description?: string;
24
+ /** Keyword tags. Precedence: llms.keywords > llmskeywords */
25
+ keywords?: string[];
26
26
  }
27
27
 
28
28
  /** A named documentation subset that generates its own combined .txt file under /_llms-txt/. */
29
29
  export interface LlmsSet {
30
- /** Display label — also used to derive the URL slug (e.g. "React Grids" → /_llms-txt/react-grids.txt). */
31
- label: string;
32
- /** Glob patterns matching page slugs to include. */
33
- paths: string[];
34
- /** Short description shown next to the link in llms.txt. */
35
- description?: string;
30
+ /** Display label — also used to derive the URL slug (e.g. "React Grids" → /_llms-txt/react-grids.txt). */
31
+ label: string;
32
+ /** Glob patterns matching page slugs to include. */
33
+ paths: string[];
34
+ /** Short description shown next to the link in llms.txt. */
35
+ description?: string;
36
36
  }
37
37
 
38
38
  // ---------------------------------------------------------------------------
@@ -40,20 +40,20 @@ export interface LlmsSet {
40
40
  // ---------------------------------------------------------------------------
41
41
 
42
42
  export interface SidebarItem {
43
- label?: string;
44
- slug?: string;
45
- items?: SidebarItem[];
43
+ label?: string;
44
+ slug?: string;
45
+ items?: SidebarItem[];
46
46
  }
47
47
 
48
48
  interface FrontmatterData {
49
- title?: string;
49
+ title?: string;
50
+ description?: string;
51
+ llmsdescription?: string;
52
+ llmskeywords?: string | string[];
53
+ llms?: {
50
54
  description?: string;
51
- llmsdescription?: string;
52
- llmskeywords?: string | string[];
53
- llms?: {
54
- description?: string;
55
- keywords?: string[];
56
- };
55
+ keywords?: string[];
56
+ };
57
57
  }
58
58
 
59
59
  // ---------------------------------------------------------------------------
@@ -61,24 +61,26 @@ interface FrontmatterData {
61
61
  // ---------------------------------------------------------------------------
62
62
 
63
63
  export function extractLlmsMeta(raw: string): LlmsMeta {
64
- let data: FrontmatterData;
65
- try {
66
- data = matter(raw).data as FrontmatterData;
67
- } catch {
68
- return {};
69
- }
70
- const description: string | undefined =
71
- data.llms?.description ??
72
- (typeof data.llmsdescription === 'string' ? data.llmsdescription : undefined) ??
73
- (typeof data.description === 'string' ? data.description : undefined);
74
- const rawKw = data.llms?.keywords ?? data.llmskeywords;
75
- const keywords: string[] | undefined = Array.isArray(rawKw)
76
- ? rawKw
77
- : typeof rawKw === 'string' ? [rawKw] : undefined;
78
- return {
79
- ...(description !== undefined ? { description } : {}),
80
- ...(keywords?.length ? { keywords } : {}),
81
- };
64
+ let data: FrontmatterData;
65
+ try {
66
+ data = matter(raw).data as FrontmatterData;
67
+ } catch {
68
+ return {};
69
+ }
70
+ const description: string | undefined =
71
+ data.llms?.description ??
72
+ (typeof data.llmsdescription === 'string' ? data.llmsdescription : undefined) ??
73
+ (typeof data.description === 'string' ? data.description : undefined);
74
+ const rawKw = data.llms?.keywords ?? data.llmskeywords;
75
+ const keywords: string[] | undefined = Array.isArray(rawKw)
76
+ ? rawKw
77
+ : typeof rawKw === 'string'
78
+ ? [rawKw]
79
+ : undefined;
80
+ return {
81
+ ...(description !== undefined ? { description } : {}),
82
+ ...(keywords?.length ? { keywords } : {}),
83
+ };
82
84
  }
83
85
 
84
86
  // ---------------------------------------------------------------------------
@@ -86,10 +88,10 @@ export function extractLlmsMeta(raw: string): LlmsMeta {
86
88
  // ---------------------------------------------------------------------------
87
89
 
88
90
  export function collectSlugs(items: SidebarItem[]): string[] {
89
- return items.flatMap(item => [
90
- ...(typeof item.slug === 'string' ? [item.slug] : []),
91
- ...(Array.isArray(item.items) ? collectSlugs(item.items) : []),
92
- ]);
91
+ return items.flatMap((item) => [
92
+ ...(typeof item.slug === 'string' ? [item.slug] : []),
93
+ ...(Array.isArray(item.items) ? collectSlugs(item.items) : []),
94
+ ]);
93
95
  }
94
96
 
95
97
  // ---------------------------------------------------------------------------
@@ -97,18 +99,20 @@ export function collectSlugs(items: SidebarItem[]): string[] {
97
99
  // ---------------------------------------------------------------------------
98
100
 
99
101
  export function buildLlmsMetaMap(docsDir: string, items: SidebarItem[]): Map<string, LlmsMeta> {
100
- const map = new Map<string, LlmsMeta>();
101
- for (const slug of collectSlugs(items)) {
102
- for (const ext of ['.md', '.mdx']) {
103
- try {
104
- const raw = fs.readFileSync(path.join(docsDir, slug + ext), 'utf-8');
105
- const meta = extractLlmsMeta(raw);
106
- if (meta.description || meta.keywords?.length) map.set(slug, meta);
107
- break;
108
- } catch { /* try next ext */ }
109
- }
102
+ const map = new Map<string, LlmsMeta>();
103
+ for (const slug of collectSlugs(items)) {
104
+ for (const ext of ['.md', '.mdx']) {
105
+ try {
106
+ const raw = fs.readFileSync(path.join(docsDir, slug + ext), 'utf-8');
107
+ const meta = extractLlmsMeta(raw);
108
+ if (meta.description || meta.keywords?.length) map.set(slug, meta);
109
+ break;
110
+ } catch {
111
+ /* try next ext */
112
+ }
110
113
  }
111
- return map;
114
+ }
115
+ return map;
112
116
  }
113
117
 
114
118
  // ---------------------------------------------------------------------------
@@ -117,7 +121,10 @@ export function buildLlmsMetaMap(docsDir: string, items: SidebarItem[]): Map<str
117
121
 
118
122
  /** Derives a URL-safe slug from a label (matches github-slugger for plain ASCII). */
119
123
  export function toUrlSlug(label: string): string {
120
- return label.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/, '');
124
+ return label
125
+ .toLowerCase()
126
+ .replace(/[^a-z0-9]+/g, '-')
127
+ .replace(/^-|-$/, '');
121
128
  }
122
129
 
123
130
  // ---------------------------------------------------------------------------
@@ -129,23 +136,23 @@ export function toUrlSlug(label: string): string {
129
136
  * These labels are treated as organisational groupings, never as label prefixes.
130
137
  */
131
138
  export const IGDOCS_BROAD_SECTIONS = [
132
- 'AI-Assisted Development',
133
- 'General',
134
- 'Interactivity',
135
- 'Grids & Lists',
136
- 'Dashboards',
137
- 'Charts',
138
- 'Maps',
139
- 'Layouts',
140
- 'Menus',
141
- 'Frameworks',
142
- 'Gauges',
143
- 'Data Entry & Display',
144
- 'Interactions',
145
- 'Notifications',
146
- 'Scheduling',
147
- 'Styling & Themes',
148
- 'Deprecated Components',
139
+ 'AI-Assisted Development',
140
+ 'General',
141
+ 'Interactivity',
142
+ 'Grids & Lists',
143
+ 'Dashboards',
144
+ 'Charts',
145
+ 'Maps',
146
+ 'Layouts',
147
+ 'Menus',
148
+ 'Frameworks',
149
+ 'Gauges',
150
+ 'Data Entry & Display',
151
+ 'Interactions',
152
+ 'Notifications',
153
+ 'Scheduling',
154
+ 'Styling & Themes',
155
+ 'Deprecated Components',
149
156
  ] as const;
150
157
 
151
158
  /** Platforms that use the Ignite UI doc broad sections. */
@@ -156,35 +163,54 @@ const IGDOCS_PLATFORMS = new Set<string>(['angular', 'react', 'blazor', 'web-com
156
163
  * Returns an empty set for platforms with no defined broad sections (appbuilder, slingshot).
157
164
  */
158
165
  export function getBroadSectionsForPlatform(platform: string | null): ReadonlySet<string> {
159
- if (platform !== null && IGDOCS_PLATFORMS.has(platform)) {
160
- return new Set(IGDOCS_BROAD_SECTIONS);
161
- }
162
- return new Set();
166
+ if (platform !== null && IGDOCS_PLATFORMS.has(platform)) {
167
+ return new Set(IGDOCS_BROAD_SECTIONS);
168
+ }
169
+ return new Set();
163
170
  }
164
171
 
165
172
  /** Returns `true` when the label is a broad navigation bucket, not a meaningful label prefix. */
166
173
  function isBroadSection(label: string, broadSections: ReadonlySet<string>): boolean {
167
- return broadSections.has(label);
174
+ return broadSections.has(label);
168
175
  }
169
176
 
170
177
  // ---------------------------------------------------------------------------
171
178
 
172
179
  const GENERIC_WORDS = new Set([
173
- 'Overview', 'Introduction', 'Getting Started', 'Quick Start',
174
- 'Examples', 'Reference', 'Guide', 'Tutorial', 'Configuration', 'Usage',
175
- 'Theming', 'Sorting', 'Editing', 'Filtering', 'Grouping', 'Paging',
176
- 'Selection', 'Summaries', 'Toolbar', 'Export', 'Virtualization',
177
- 'Accessibility', 'Localization', 'Styling',
180
+ 'Overview',
181
+ 'Introduction',
182
+ 'Getting Started',
183
+ 'Quick Start',
184
+ 'Examples',
185
+ 'Reference',
186
+ 'Guide',
187
+ 'Tutorial',
188
+ 'Configuration',
189
+ 'Usage',
190
+ 'Theming',
191
+ 'Sorting',
192
+ 'Editing',
193
+ 'Filtering',
194
+ 'Grouping',
195
+ 'Paging',
196
+ 'Selection',
197
+ 'Summaries',
198
+ 'Toolbar',
199
+ 'Export',
200
+ 'Virtualization',
201
+ 'Accessibility',
202
+ 'Localization',
203
+ 'Styling',
178
204
  ]);
179
205
 
180
206
  function isGeneric(label: string): boolean {
181
- return GENERIC_WORDS.has(label) || [...GENERIC_WORDS].some(w => label.startsWith(w + ' '));
207
+ return GENERIC_WORDS.has(label) || [...GENERIC_WORDS].some((w) => label.startsWith(w + ' '));
182
208
  }
183
209
 
184
210
  /** Strips a leading `"<prefix> "` from label if present, avoiding "Editing Editing Overview". */
185
211
  function stripLeadingDuplicate(label: string, prefix: string): string {
186
- const candidate = `${prefix} `;
187
- return label.startsWith(candidate) ? label.slice(candidate.length) : label;
212
+ const candidate = `${prefix} `;
213
+ return label.startsWith(candidate) ? label.slice(candidate.length) : label;
188
214
  }
189
215
 
190
216
  /**
@@ -206,26 +232,30 @@ function stripLeadingDuplicate(label: string, prefix: string): string {
206
232
  * - specific label → `component label` e.g. "Grid Cell Editing"
207
233
  * (stripLeadingDuplicate avoids "Grid Editing Editing Overview")
208
234
  */
209
- function buildLabel(label: string, ancestorPath: string[], broadSections: ReadonlySet<string> = new Set()): string {
210
- // Strip navigation buckets — they are not useful label prefixes.
211
- const filtered = ancestorPath.filter(a => !isBroadSection(a, broadSections));
235
+ function buildLabel(
236
+ label: string,
237
+ ancestorPath: string[],
238
+ broadSections: ReadonlySet<string> = new Set(),
239
+ ): string {
240
+ // Strip navigation buckets — they are not useful label prefixes.
241
+ const filtered = ancestorPath.filter((a) => !isBroadSection(a, broadSections));
212
242
 
213
- if (filtered.length === 0) return label;
243
+ if (filtered.length === 0) return label;
214
244
 
215
- if (filtered.length === 1) {
216
- const parent = filtered[0];
217
- return isGeneric(label) ? `${parent} ${label}` : label;
218
- }
245
+ if (filtered.length === 1) {
246
+ const parent = filtered[0];
247
+ return isGeneric(label) ? `${parent} ${label}` : label;
248
+ }
219
249
 
220
- const component = filtered[filtered.length - 2];
221
- const subsection = filtered[filtered.length - 1];
250
+ const component = filtered[filtered.length - 2];
251
+ const subsection = filtered[filtered.length - 1];
222
252
 
223
- if (isGeneric(label)) {
224
- const deduped = stripLeadingDuplicate(label, subsection);
225
- return `${component} ${subsection} ${deduped}`;
226
- }
253
+ if (isGeneric(label)) {
254
+ const deduped = stripLeadingDuplicate(label, subsection);
255
+ return `${component} ${subsection} ${deduped}`;
256
+ }
227
257
 
228
- return `${component} ${label}`;
258
+ return `${component} ${label}`;
229
259
  }
230
260
 
231
261
  // ---------------------------------------------------------------------------
@@ -233,50 +263,50 @@ function buildLabel(label: string, ancestorPath: string[], broadSections: Readon
233
263
  // ---------------------------------------------------------------------------
234
264
 
235
265
  function walkLlmsItems(
236
- items: SidebarItem[],
237
- base: string,
238
- lines: string[],
239
- meta: Record<string, LlmsMeta>,
240
- seen: Set<string>,
241
- ancestorPath: string[] = [],
242
- depth = 0,
243
- broadSections: ReadonlySet<string> = new Set(),
266
+ items: SidebarItem[],
267
+ base: string,
268
+ lines: string[],
269
+ meta: Record<string, LlmsMeta>,
270
+ seen: Set<string>,
271
+ ancestorPath: string[] = [],
272
+ depth = 0,
273
+ broadSections: ReadonlySet<string> = new Set(),
244
274
  ): void {
245
- const groups: SidebarItem[] = [];
246
-
247
- for (const item of items) {
248
- if (item.slug !== undefined) {
249
- const slug = item.slug === '' ? 'index' : item.slug;
250
- if (seen.has(slug)) continue;
251
- seen.add(slug);
252
-
253
- const label = buildLabel(item.label ?? slug, ancestorPath, broadSections);
254
- const m = meta[slug];
255
- let line = `- [${label}](${base}/${slug}.md)`;
256
- if (m?.description) line += `: ${m.description}`;
257
- lines.push(line);
258
- if (m?.keywords?.length) lines.push(` Tags: ${m.keywords.join(', ')}`);
259
- continue;
260
- }
261
- if (Array.isArray(item.items) && item.items.length > 0) groups.push(item);
275
+ const groups: SidebarItem[] = [];
276
+
277
+ for (const item of items) {
278
+ if (item.slug !== undefined) {
279
+ const slug = item.slug === '' ? 'index' : item.slug;
280
+ if (seen.has(slug)) continue;
281
+ seen.add(slug);
282
+
283
+ const label = buildLabel(item.label ?? slug, ancestorPath, broadSections);
284
+ const m = meta[slug];
285
+ let line = `- [${label}](${base}/${slug}.md)`;
286
+ if (m?.description) line += `: ${m.description}`;
287
+ lines.push(line);
288
+ if (m?.keywords?.length) lines.push(` Tags: ${m.keywords.join(', ')}`);
289
+ continue;
262
290
  }
291
+ if (Array.isArray(item.items) && item.items.length > 0) groups.push(item);
292
+ }
263
293
 
264
- for (const group of groups) {
265
- if (depth < 3) {
266
- const headingLevel = depth === 0 ? 2 : depth + 2;
267
- lines.push('', `${'#'.repeat(headingLevel)} ${group.label}`, '');
268
- }
269
- walkLlmsItems(
270
- group.items!,
271
- base,
272
- lines,
273
- meta,
274
- seen,
275
- [...ancestorPath, group.label ?? ''],
276
- depth + 1,
277
- broadSections,
278
- );
294
+ for (const group of groups) {
295
+ if (depth < 3) {
296
+ const headingLevel = depth === 0 ? 2 : depth + 2;
297
+ lines.push('', `${'#'.repeat(headingLevel)} ${group.label}`, '');
279
298
  }
299
+ walkLlmsItems(
300
+ group.items!,
301
+ base,
302
+ lines,
303
+ meta,
304
+ seen,
305
+ [...ancestorPath, group.label ?? ''],
306
+ depth + 1,
307
+ broadSections,
308
+ );
309
+ }
280
310
  }
281
311
 
282
312
  // ---------------------------------------------------------------------------
@@ -284,32 +314,41 @@ function walkLlmsItems(
284
314
  // ---------------------------------------------------------------------------
285
315
 
286
316
  export function buildLlmsTxt(
287
- base: string,
288
- siteTitle: string,
289
- siteDescription: string,
290
- sidebarItems: SidebarItem[],
291
- metaMap: Map<string, LlmsMeta>,
292
- llmsSets: LlmsSet[] = [],
293
- broadSections: ReadonlySet<string> = new Set(),
317
+ base: string,
318
+ siteTitle: string,
319
+ siteDescription: string,
320
+ sidebarItems: SidebarItem[],
321
+ metaMap: Map<string, LlmsMeta>,
322
+ llmsSets: LlmsSet[] = [],
323
+ broadSections: ReadonlySet<string> = new Set(),
294
324
  ): string {
295
- const lines: string[] = [
296
- `# ${siteTitle}`,
297
- '',
298
- `> ${siteDescription}`,
299
- '',
300
- '## Documentation sets',
301
- '',
302
- `- [Abridged documentation](${base}/llms-small.txt): a compact version of the documentation, with non-essential content removed`,
303
- `- [Combined docs](${base}/llms-full.txt): Single-file Markdown export of all docs.`,
304
- ``
305
- ];
306
-
307
- for (const set of llmsSets) {
308
- const slug = toUrlSlug(set.label);
309
- const link = `- [${set.label}](${base}/_llms-txt/${slug}.txt)`;
310
- lines.push(set.description ? `${link}: ${set.description}` : link);
311
- }
312
-
313
- walkLlmsItems(sidebarItems, base, lines, Object.fromEntries(metaMap), new Set(), [], 0, broadSections);
314
- return lines.join('\n');
325
+ const lines: string[] = [
326
+ `# ${siteTitle}`,
327
+ '',
328
+ `> ${siteDescription}`,
329
+ '',
330
+ '## Documentation sets',
331
+ '',
332
+ `- [Abridged documentation](${base}/llms-small.txt): a compact version of the documentation, with non-essential content removed`,
333
+ `- [Combined docs](${base}/llms-full.txt): Single-file Markdown export of all docs.`,
334
+ ``,
335
+ ];
336
+
337
+ for (const set of llmsSets) {
338
+ const slug = toUrlSlug(set.label);
339
+ const link = `- [${set.label}](${base}/_llms-txt/${slug}.txt)`;
340
+ lines.push(set.description ? `${link}: ${set.description}` : link);
341
+ }
342
+
343
+ walkLlmsItems(
344
+ sidebarItems,
345
+ base,
346
+ lines,
347
+ Object.fromEntries(metaMap),
348
+ new Set(),
349
+ [],
350
+ 0,
351
+ broadSections,
352
+ );
353
+ return lines.join('\n');
315
354
  }