From f8e157e3c335dfbf37dff171893c3a431aaeb8ae Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Mon, 19 Aug 2024 12:36:18 +0200 Subject: [PATCH] Update docusaurus.config.js --- documentation/docusaurus.config.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/documentation/docusaurus.config.js b/documentation/docusaurus.config.js index 6eba7aaf..61bf405d 100644 --- a/documentation/docusaurus.config.js +++ b/documentation/docusaurus.config.js @@ -59,6 +59,20 @@ const siteConfig = { ], }, exclude: ["**/**/_*.md"], + // Adding the sidebarItemsGenerator with reverse logic + async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) { + const sidebarItems = await defaultSidebarItemsGenerator(args); + + // Reverse items only for the 'Changelog' category + const modifiedSidebarItems = sidebarItems.map((item) => { + if (item.type === 'category' && item.label === 'Changelog') { + return { ...item, items: item.items.reverse() }; + } + return item; + }); + + return modifiedSidebarItems; + }, }, blog: false, theme: { @@ -128,7 +142,7 @@ const siteConfig = { { blogTitle: "Blog", blogDescription: - "A resource for Refine, front-end ecosystem, and web development", + "A resource for OpenPanel, front-end ecosystem, and web development", routeBasePath: "/blog", postsPerPage: 12, blogSidebarTitle: "All posts",