Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 2dae5d5

Browse files
committed
Reverse items below upgrade guide
1 parent 6599ff2 commit 2dae5d5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

docs/docs/upgrading/_category_.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"link": {
55
"type": "doc",
66
"id": "upgrading/index"
7+
},
8+
"customProps": {
9+
"reverse": true
710
}
811
}

docs/docusaurus.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,17 @@ const config = {
4040
current: {
4141
label: '🔜 Next'
4242
}
43-
}
43+
},
44+
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
45+
const sidebarItems = await defaultSidebarItemsGenerator(args);
46+
const result = sidebarItems.map((item) => {
47+
if (item.type === 'category' && item.customProps?.reverse) {
48+
return {...item, items: item.items.reverse()};
49+
}
50+
return item;
51+
});
52+
return result;
53+
},
4454
},
4555
blog: false,
4656
theme: {

0 commit comments

Comments
 (0)