File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515const fs = require ( 'fs' ) ;
1616const path = require ( 'path' ) ;
17- const { shouldExcludeFromBuild } = require ( '../src/docConfig' ) ;
17+ const { docs : registry , shouldExcludeFromBuild } = require ( '../src/docConfig' ) ;
1818
1919const DOCS_DIR = path . join ( __dirname , '..' , 'docs' ) ;
2020const SIDEBAR_PATH = path . join ( __dirname , '..' , 'sidebars.js' ) ;
@@ -576,7 +576,7 @@ function generateSidebars() {
576576 const versionFormatted = version . replace ( / \. / g, '_' ) ;
577577 const sidebarKey = `${ groupCamel } ${ folderCamel } _${ versionFormatted } ` ;
578578
579- const documentName = titleCase ( folderName ) ;
579+ const documentName = registry . find ( ( d ) => d . doc_location === docPath ) ?. sidebar_label || titleCase ( folderName ) ;
580580
581581 // Only create if not already present
582582 if ( ! sidebarContent [ sidebarKey ] ) {
Original file line number Diff line number Diff line change 2626 * with watermark, fully searchable) or inactive+draft (unpublished, no
2727 * watermark visible because the doc isn't on the prod site).
2828 *
29+ * Sidebar label (optional): `sidebar_label` sets the document's name in its sidebar
30+ * and breadcrumbs. Without it, the name is the title-cased folder name, which is
31+ * wrong for folders that abbreviate (e.g. "cle-freezing-screening" → "Cle …").
32+ *
2933 * Download-only entries (downloadUrl, no doc_location) are tiles that link
3034 * directly to a PDF — they have no associated MDX folder and are unaffected
3135 * by the active/draft build-inclusion logic.
You can’t perform that action at this time.
0 commit comments