Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/generateSidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

const fs = require('fs');
const path = require('path');
const { shouldExcludeFromBuild } = require('../src/docConfig');
const { docs: registry, shouldExcludeFromBuild } = require('../src/docConfig');

const DOCS_DIR = path.join(__dirname, '..', 'docs');
const SIDEBAR_PATH = path.join(__dirname, '..', 'sidebars.js');
Expand Down Expand Up @@ -576,7 +576,7 @@ function generateSidebars() {
const versionFormatted = version.replace(/\./g, '_');
const sidebarKey = `${groupCamel}${folderCamel}_${versionFormatted}`;

const documentName = titleCase(folderName);
const documentName = registry.find((d) => d.doc_location === docPath)?.sidebar_label || titleCase(folderName);

// Only create if not already present
if (!sidebarContent[sidebarKey]) {
Expand Down
4 changes: 4 additions & 0 deletions src/docConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
* with watermark, fully searchable) or inactive+draft (unpublished, no
* watermark visible because the doc isn't on the prod site).
*
* Sidebar label (optional): `sidebar_label` sets the document's name in its sidebar
* and breadcrumbs. Without it, the name is the title-cased folder name, which is
* wrong for folders that abbreviate (e.g. "cle-freezing-screening" → "Cle …").
*
* Download-only entries (downloadUrl, no doc_location) are tiles that link
* directly to a PDF — they have no associated MDX folder and are unaffected
* by the active/draft build-inclusion logic.
Expand Down
Loading