Update docusaurus.config.js

This commit is contained in:
Stefan Pejcic 2024-08-19 12:36:18 +02:00 committed by GitHub
parent 691fb23d84
commit f8e157e3c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,6 +59,20 @@ const siteConfig = {
], ],
}, },
exclude: ["**/**/_*.md"], 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, blog: false,
theme: { theme: {
@ -128,7 +142,7 @@ const siteConfig = {
{ {
blogTitle: "Blog", blogTitle: "Blog",
blogDescription: blogDescription:
"A resource for Refine, front-end ecosystem, and web development", "A resource for OpenPanel, front-end ecosystem, and web development",
routeBasePath: "/blog", routeBasePath: "/blog",
postsPerPage: 12, postsPerPage: 12,
blogSidebarTitle: "All posts", blogSidebarTitle: "All posts",