docs: support multiple sidebars in a project (#11768)

* changed to new sidebar across projects except resources

* finalize multi sidebar support

* clean up

* remove redundant property

* small changes

* fixes

* generate

* fix error

* fix initial open
This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-03-07 15:47:38 +02:00
1 parent 2a0bd86204
commit 5deb8eaf50
108 files changed
+37634 -36749

No files matched your search

+11 -3
View File
@@ -1,6 +1,6 @@
import { DocsConfig } from "types"
import { sidebarConfig } from "./sidebar"
import { DocsConfig, Sidebar } from "types"
import { globalConfig } from "docs-ui"
import { generatedSidebars } from "../generated/sidebar.mjs"
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
@@ -9,10 +9,18 @@ export const config: DocsConfig = {
titleSuffix: "Medusa v2 Documentation",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebar: sidebarConfig,
sidebars: generatedSidebars as Sidebar.Sidebar[],
project: {
title: "Documentation",
key: "book",
},
logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`,
breadcrumbOptions: {
startItems: [
{
title: "Documentation",
link: "/",
},
],
},
}
-8
View File
@@ -1,8 +0,0 @@
import type { SidebarConfig } from "@/types"
import { generatedSidebar } from "../generated/sidebar.mjs"
import { SidebarItem } from "types"
export const sidebarConfig: SidebarConfig = {
default: generatedSidebar as SidebarItem[],
mobile: [],
}