Skip to content

Commit

Permalink
Remove leading index from sidebar item text
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchen committed Feb 6, 2024
1 parent a6d757e commit 838f0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/shared/multipleSidebarBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function folderToSidebarItems(folder: DirectoryInfo, base: string): DefaultTheme
const sub = subs[index];
const currentSidebarItem: DefaultTheme.SidebarItem = {
collapsed: false,
text: sub.name,
text: sub.name.replace(/^\d+\.\s*/, ''), // remove leading index
items: folderToSidebarItems(sub, `${base}/${folder.name}`),
};
items.push(currentSidebarItem);
Expand Down

0 comments on commit 838f0cc

Please sign in to comment.