Skip to content

Commit f07aaa6

Browse files
wixysamcursoragent
andcommitted
Set SDK reference docs groups to expanded by default
- Update file-processing.js to add expanded: true to generated groups - Update copy-to-local-docs.js to preserve expanded: true in nested groups - Ensures Client and Modules groups are open by default in docs Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a7d07f0 commit f07aaa6

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/mintlify-post-processing/copy-to-local-docs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ function updateDocsJson(repoDir, sdkFiles) {
151151
const sdkReferencePages = Array.from(groupMap.entries()).map(
152152
([groupName, pages]) => ({
153153
group: groupName,
154+
expanded: true,
154155
pages: pages.sort(), // Sort pages alphabetically within each group
155156
})
156157
);

scripts/mintlify-post-processing/file-processing/file-processing.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,20 +361,23 @@ function generateDocsJson(docsContent) {
361361
if (docsContent.functions.length > 0 && categoryMap.functions) {
362362
groups.push({
363363
group: getGroupName("functions", categoryMap),
364+
expanded: true,
364365
pages: docsContent.functions,
365366
});
366367
}
367368

368369
if (docsContent.interfaces.length > 0 && categoryMap.interfaces) {
369370
groups.push({
370371
group: getGroupName("interfaces", categoryMap),
372+
expanded: true,
371373
pages: docsContent.interfaces,
372374
});
373375
}
374376

375377
if (docsContent.classes.length > 0 && categoryMap.classes) {
376378
groups.push({
377379
group: getGroupName("classes", categoryMap),
380+
expanded: true,
378381
pages: docsContent.classes,
379382
});
380383
}
@@ -391,6 +394,7 @@ function generateDocsJson(docsContent) {
391394
} else {
392395
groups.push({
393396
group: groupName,
397+
expanded: true,
394398
pages: docsContent.typeAliases,
395399
});
396400
}

0 commit comments

Comments
 (0)