docs: improve main docs and resources sidebar (#8664)

This commit is contained in:
Shahed Nasser
2024-08-20 12:31:50 +02:00
committed by GitHub
parent bc19a9162a
commit 1020ab0b97
5 changed files with 46 additions and 1 deletions
+4 -1
View File
@@ -21,13 +21,16 @@ export default function numberSidebarItems(sidebarItems, numbering = [1]) {
// append current number to the item's title
item.number = `${numbering.join(".")}.`
item.chapterTitle = `${item.number} ${
item.chapterTitle?.trim() || item.title?.trim()
}`
item.title = `${item.number} ${item.title.trim()}`
if (isTopItems) {
// Add chapter category
numberedItems.push({
type: "category",
title: item.title,
title: item.chapterTitle,
children: [],
loaded: true,
initialOpen: false,