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:
@@ -64,13 +64,7 @@ export default function RootLayout({
|
||||
htmlClassName={clsx(inter.variable, robotoMono.variable)}
|
||||
gaId={process.env.NEXT_PUBLIC_GA_ID}
|
||||
>
|
||||
<TightLayout
|
||||
sidebarProps={{
|
||||
expandItems: true,
|
||||
}}
|
||||
ProvidersComponent={Providers}
|
||||
footerComponent={<Footer />}
|
||||
>
|
||||
<TightLayout ProvidersComponent={Providers} footerComponent={<Footer />}>
|
||||
{children}
|
||||
<Feedback className="my-2" />
|
||||
<EditButton />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DocsConfig, SidebarItem } from "types"
|
||||
import { generatedSidebar as sidebar } from "@/generated/sidebar.mjs"
|
||||
import { DocsConfig, Sidebar } from "types"
|
||||
import { generatedSidebars } from "@/generated/sidebar.mjs"
|
||||
import { globalConfig } from "docs-ui"
|
||||
|
||||
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
|
||||
@@ -9,16 +9,18 @@ export const config: DocsConfig = {
|
||||
titleSuffix: "Medusa Admin User Guide",
|
||||
baseUrl,
|
||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
|
||||
sidebar: {
|
||||
default: sidebar as SidebarItem[],
|
||||
mobile: [],
|
||||
},
|
||||
sidebars: generatedSidebars as Sidebar.Sidebar[],
|
||||
project: {
|
||||
title: "User Guide",
|
||||
key: "user-guide",
|
||||
},
|
||||
breadcrumbOptions: {
|
||||
showCategories: true,
|
||||
},
|
||||
logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`,
|
||||
breadcrumbOptions: {
|
||||
startItems: [
|
||||
{
|
||||
title: "Documentation",
|
||||
link: baseUrl,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,166 +1,59 @@
|
||||
export const generatedSidebar = [
|
||||
export const generatedSidebars = [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/",
|
||||
"title": "Introduction",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/reset-password",
|
||||
"title": "Reset Password",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Tips",
|
||||
"autogenerate_path": "/tips",
|
||||
"children": [
|
||||
"sidebar_id": "user-guide",
|
||||
"title": "User Guide",
|
||||
"items": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/tips/bulk-editor",
|
||||
"title": "Bulk Editor in Medusa Admin",
|
||||
"description": "",
|
||||
"path": "/",
|
||||
"title": "Introduction",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/tips/languages",
|
||||
"title": "Languages in Medusa Admin",
|
||||
"description": "",
|
||||
"path": "/reset-password",
|
||||
"title": "Reset Password",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/tips/lists",
|
||||
"title": "Lists",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Orders",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/orders",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Details",
|
||||
"path": "/orders/manage",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Payments",
|
||||
"path": "/orders/payments",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Fulfillments",
|
||||
"path": "/orders/fulfillments",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Edit Order Items",
|
||||
"path": "/orders/edit",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Returns",
|
||||
"path": "/orders/returns",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Exchanges",
|
||||
"path": "/orders/exchanges",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Claims",
|
||||
"path": "/orders/claims",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Products",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/products",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Create Product",
|
||||
"path": "/products/create",
|
||||
"type": "category",
|
||||
"title": "Tips",
|
||||
"autogenerate_path": "/tips",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Multi-Part Product",
|
||||
"path": "/products/create/multi-part",
|
||||
"path": "/tips/bulk-editor",
|
||||
"title": "Bulk Editor in Medusa Admin",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Bundle Product",
|
||||
"path": "/products/create/bundle",
|
||||
"path": "/tips/languages",
|
||||
"title": "Languages in Medusa Admin",
|
||||
"description": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/tips/lists",
|
||||
"title": "Lists",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
@@ -168,224 +61,71 @@ export const generatedSidebar = [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Edit Product",
|
||||
"path": "/products/edit",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Variants",
|
||||
"path": "/products/variants",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Collections",
|
||||
"path": "/products/collections",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Categories",
|
||||
"path": "/products/categories",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Import Products",
|
||||
"path": "/products/import",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Export Products",
|
||||
"path": "/products/export",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Inventory",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/inventory",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Inventory",
|
||||
"path": "/inventory/inventory",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Reservations",
|
||||
"path": "/inventory/reservations",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Customers",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/customers",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Customers",
|
||||
"path": "/customers/manage",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Groups",
|
||||
"path": "/customers/groups",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Promotions",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/promotions",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Create Promotion",
|
||||
"path": "/promotions/create",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Promotion",
|
||||
"path": "/promotions/manage",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Campaigns",
|
||||
"path": "/promotions/campaigns",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Price Lists",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/price-lists",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Create Price List",
|
||||
"path": "/price-lists/create",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Price List",
|
||||
"path": "/price-lists/manage",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Settings",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/settings",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Store",
|
||||
"path": "/settings/store",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Users",
|
||||
"path": "/settings/users",
|
||||
"type": "category",
|
||||
"title": "Orders",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Invites",
|
||||
"path": "/settings/users/invites",
|
||||
"title": "Overview",
|
||||
"path": "/orders",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Details",
|
||||
"path": "/orders/manage",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Payments",
|
||||
"path": "/orders/payments",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Fulfillments",
|
||||
"path": "/orders/fulfillments",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Edit Order Items",
|
||||
"path": "/orders/edit",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Returns",
|
||||
"path": "/orders/returns",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Exchanges",
|
||||
"path": "/orders/exchanges",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Claims",
|
||||
"path": "/orders/claims",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
@@ -393,72 +133,88 @@ export const generatedSidebar = [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Regions",
|
||||
"path": "/settings/regions",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Tax Regions",
|
||||
"path": "/settings/tax-regions",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Return Reasons",
|
||||
"path": "/settings/return-reasons",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Sales Channels",
|
||||
"path": "/settings/sales-channels",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Product Types",
|
||||
"path": "/settings/product-types",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Product Tags",
|
||||
"path": "/settings/product-tags",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Location & Shipping",
|
||||
"path": "/settings/locations-and-shipping",
|
||||
"type": "category",
|
||||
"title": "Products",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Locations",
|
||||
"path": "/settings/locations-and-shipping/locations",
|
||||
"title": "Overview",
|
||||
"path": "/products",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Shipping Profiles",
|
||||
"path": "/settings/locations-and-shipping/shipping-profiles",
|
||||
"title": "Create Product",
|
||||
"path": "/products/create",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Multi-Part Product",
|
||||
"path": "/products/create/multi-part",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Bundle Product",
|
||||
"path": "/products/create/bundle",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Edit Product",
|
||||
"path": "/products/edit",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Variants",
|
||||
"path": "/products/variants",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Collections",
|
||||
"path": "/products/collections",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Categories",
|
||||
"path": "/products/categories",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Import Products",
|
||||
"path": "/products/import",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Export Products",
|
||||
"path": "/products/export",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
@@ -466,32 +222,31 @@ export const generatedSidebar = [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Developer Settings",
|
||||
"path": "/settings/developer",
|
||||
"type": "category",
|
||||
"title": "Inventory",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Publishable API Keys",
|
||||
"path": "/settings/developer/publishable-api-keys",
|
||||
"title": "Overview",
|
||||
"path": "/inventory",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Secret API Keys",
|
||||
"path": "/settings/developer/secret-api-keys",
|
||||
"title": "Manage Inventory",
|
||||
"path": "/inventory/inventory",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Workflows",
|
||||
"path": "/settings/developer/workflows",
|
||||
"title": "Manage Reservations",
|
||||
"path": "/inventory/reservations",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
@@ -499,10 +254,261 @@ export const generatedSidebar = [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Profile",
|
||||
"path": "/settings/profile",
|
||||
"children": []
|
||||
"type": "category",
|
||||
"title": "Customers",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/customers",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Customers",
|
||||
"path": "/customers/manage",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Groups",
|
||||
"path": "/customers/groups",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Promotions",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/promotions",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Create Promotion",
|
||||
"path": "/promotions/create",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Promotion",
|
||||
"path": "/promotions/manage",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Campaigns",
|
||||
"path": "/promotions/campaigns",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Price Lists",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/price-lists",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Create Price List",
|
||||
"path": "/price-lists/create",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Price List",
|
||||
"path": "/price-lists/manage",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "category",
|
||||
"title": "Settings",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Overview",
|
||||
"path": "/settings",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Store",
|
||||
"path": "/settings/store",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Users",
|
||||
"path": "/settings/users",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Invites",
|
||||
"path": "/settings/users/invites",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Regions",
|
||||
"path": "/settings/regions",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Tax Regions",
|
||||
"path": "/settings/tax-regions",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Return Reasons",
|
||||
"path": "/settings/return-reasons",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Sales Channels",
|
||||
"path": "/settings/sales-channels",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Product Types",
|
||||
"path": "/settings/product-types",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Product Tags",
|
||||
"path": "/settings/product-tags",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Location & Shipping",
|
||||
"path": "/settings/locations-and-shipping",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Locations",
|
||||
"path": "/settings/locations-and-shipping/locations",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Manage Shipping Profiles",
|
||||
"path": "/settings/locations-and-shipping/shipping-profiles",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Developer Settings",
|
||||
"path": "/settings/developer",
|
||||
"children": [
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Publishable API Keys",
|
||||
"path": "/settings/developer/publishable-api-keys",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Secret API Keys",
|
||||
"path": "/settings/developer/secret-api-keys",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Workflows",
|
||||
"path": "/settings/developer/workflows",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"title": "Profile",
|
||||
"path": "/settings/profile",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -14,13 +14,8 @@ const SidebarProvider = ({ children }: SidebarProviderProps) => {
|
||||
|
||||
return (
|
||||
<UiSidebarProvider
|
||||
shouldHandlePathChange={true}
|
||||
shouldHandleHashChange={false}
|
||||
scrollableElement={scrollableElement}
|
||||
initialItems={config.sidebar}
|
||||
staticSidebarItems={true}
|
||||
disableActiveTransition={true}
|
||||
projectName="user-guide"
|
||||
sidebars={config.sidebars}
|
||||
>
|
||||
{children}
|
||||
</UiSidebarProvider>
|
||||
|
||||
+267
-265
@@ -1,320 +1,322 @@
|
||||
import { sidebarAttachHrefCommonOptions } from "build-scripts"
|
||||
|
||||
// TODO check the order of items based on the Medusa Admin's sidebar
|
||||
|
||||
/** @type {import('types').RawSidebarItemType[]} */
|
||||
export const sidebar = sidebarAttachHrefCommonOptions([
|
||||
/** @type {import('types').Sidebar.RawSidebar[]} */
|
||||
export const sidebar = [
|
||||
{
|
||||
type: "link",
|
||||
path: "/",
|
||||
title: "Introduction",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
path: "/reset-password",
|
||||
title: "Reset Password",
|
||||
},
|
||||
{
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Tips",
|
||||
autogenerate_path: "/tips",
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Orders",
|
||||
children: [
|
||||
sidebar_id: "user-guide",
|
||||
title: "User Guide",
|
||||
items: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/orders",
|
||||
path: "/",
|
||||
title: "Introduction",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Details",
|
||||
path: "/orders/manage",
|
||||
path: "/reset-password",
|
||||
title: "Reset Password",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Payments",
|
||||
path: "/orders/payments",
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Fulfillments",
|
||||
path: "/orders/fulfillments",
|
||||
type: "category",
|
||||
title: "Tips",
|
||||
autogenerate_path: "/tips",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Edit Order Items",
|
||||
path: "/orders/edit",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Returns",
|
||||
path: "/orders/returns",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Exchanges",
|
||||
path: "/orders/exchanges",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Claims",
|
||||
path: "/orders/claims",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Products",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/products",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Create Product",
|
||||
path: "/products/create",
|
||||
type: "category",
|
||||
title: "Orders",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Multi-Part Product",
|
||||
path: "/products/create/multi-part",
|
||||
title: "Overview",
|
||||
path: "/orders",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Bundle Product",
|
||||
path: "/products/create/bundle",
|
||||
title: "Manage Details",
|
||||
path: "/orders/manage",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Payments",
|
||||
path: "/orders/payments",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Fulfillments",
|
||||
path: "/orders/fulfillments",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Edit Order Items",
|
||||
path: "/orders/edit",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Returns",
|
||||
path: "/orders/returns",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Exchanges",
|
||||
path: "/orders/exchanges",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Claims",
|
||||
path: "/orders/claims",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Edit Product",
|
||||
path: "/products/edit",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Variants",
|
||||
path: "/products/variants",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Collections",
|
||||
path: "/products/collections",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Categories",
|
||||
path: "/products/categories",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Import Products",
|
||||
path: "/products/import",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Export Products",
|
||||
path: "/products/export",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Inventory",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/inventory",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Inventory",
|
||||
path: "/inventory/inventory",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Reservations",
|
||||
path: "/inventory/reservations",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Customers",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/customers",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Customers",
|
||||
path: "/customers/manage",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Groups",
|
||||
path: "/customers/groups",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Promotions",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/promotions",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Create Promotion",
|
||||
path: "/promotions/create",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Promotion",
|
||||
path: "/promotions/manage",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Campaigns",
|
||||
path: "/promotions/campaigns",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Price Lists",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/price-lists",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Create Price List",
|
||||
path: "/price-lists/create",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Price List",
|
||||
path: "/price-lists/manage",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Settings",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/settings",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Store",
|
||||
path: "/settings/store",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Users",
|
||||
path: "/settings/users",
|
||||
type: "category",
|
||||
title: "Products",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Invites",
|
||||
path: "/settings/users/invites",
|
||||
title: "Overview",
|
||||
path: "/products",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Create Product",
|
||||
path: "/products/create",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Multi-Part Product",
|
||||
path: "/products/create/multi-part",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Bundle Product",
|
||||
path: "/products/create/bundle",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Edit Product",
|
||||
path: "/products/edit",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Variants",
|
||||
path: "/products/variants",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Collections",
|
||||
path: "/products/collections",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Categories",
|
||||
path: "/products/categories",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Import Products",
|
||||
path: "/products/import",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Export Products",
|
||||
path: "/products/export",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Regions",
|
||||
path: "/settings/regions",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Tax Regions",
|
||||
path: "/settings/tax-regions",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Return Reasons",
|
||||
path: "/settings/return-reasons",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Sales Channels",
|
||||
path: "/settings/sales-channels",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Product Types",
|
||||
path: "/settings/product-types",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Product Tags",
|
||||
path: "/settings/product-tags",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Location & Shipping",
|
||||
path: "/settings/locations-and-shipping",
|
||||
type: "category",
|
||||
title: "Inventory",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Locations",
|
||||
path: "/settings/locations-and-shipping/locations",
|
||||
title: "Overview",
|
||||
path: "/inventory",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Shipping Profiles",
|
||||
path: "/settings/locations-and-shipping/shipping-profiles",
|
||||
title: "Manage Inventory",
|
||||
path: "/inventory/inventory",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Reservations",
|
||||
path: "/inventory/reservations",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Developer Settings",
|
||||
path: "/settings/developer",
|
||||
type: "category",
|
||||
title: "Customers",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Publishable API Keys",
|
||||
path: "/settings/developer/publishable-api-keys",
|
||||
title: "Overview",
|
||||
path: "/customers",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Secret API Keys",
|
||||
path: "/settings/developer/secret-api-keys",
|
||||
title: "Manage Customers",
|
||||
path: "/customers/manage",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Workflows",
|
||||
path: "/settings/developer/workflows",
|
||||
title: "Manage Groups",
|
||||
path: "/customers/groups",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Profile",
|
||||
path: "/settings/profile",
|
||||
type: "category",
|
||||
title: "Promotions",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/promotions",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Create Promotion",
|
||||
path: "/promotions/create",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Promotion",
|
||||
path: "/promotions/manage",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Campaigns",
|
||||
path: "/promotions/campaigns",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Price Lists",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/price-lists",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Create Price List",
|
||||
path: "/price-lists/create",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Price List",
|
||||
path: "/price-lists/manage",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
title: "Settings",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Overview",
|
||||
path: "/settings",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Store",
|
||||
path: "/settings/store",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Users",
|
||||
path: "/settings/users",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Invites",
|
||||
path: "/settings/users/invites",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Regions",
|
||||
path: "/settings/regions",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Tax Regions",
|
||||
path: "/settings/tax-regions",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Return Reasons",
|
||||
path: "/settings/return-reasons",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Sales Channels",
|
||||
path: "/settings/sales-channels",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Product Types",
|
||||
path: "/settings/product-types",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Product Tags",
|
||||
path: "/settings/product-tags",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Location & Shipping",
|
||||
path: "/settings/locations-and-shipping",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Locations",
|
||||
path: "/settings/locations-and-shipping/locations",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Manage Shipping Profiles",
|
||||
path: "/settings/locations-and-shipping/shipping-profiles",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Developer Settings",
|
||||
path: "/settings/developer",
|
||||
children: [
|
||||
{
|
||||
type: "link",
|
||||
title: "Publishable API Keys",
|
||||
path: "/settings/developer/publishable-api-keys",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Secret API Keys",
|
||||
path: "/settings/developer/secret-api-keys",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Workflows",
|
||||
path: "/settings/developer/workflows",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
title: "Profile",
|
||||
path: "/settings/profile",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user