docs: improve main docs and resources sidebar (#8664)
This commit is contained in:
1 parent
bc19a9162a
commit
1020ab0b97
5 files changed
+46
-1
No files matched your search
@@ -13,11 +13,13 @@ export const sidebar = numberSidebarItems(
|
|||||||
type: "link",
|
type: "link",
|
||||||
path: "/first-customizations",
|
path: "/first-customizations",
|
||||||
title: "Your First Customizations",
|
title: "Your First Customizations",
|
||||||
|
chapterTitle: "First Customization",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
path: "/basics",
|
path: "/basics",
|
||||||
title: "The Basics",
|
title: "The Basics",
|
||||||
|
chapterTitle: "Basics",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -85,6 +87,7 @@ export const sidebar = numberSidebarItems(
|
|||||||
type: "link",
|
type: "link",
|
||||||
path: "/advanced-development",
|
path: "/advanced-development",
|
||||||
title: "Advanced Development",
|
title: "Advanced Development",
|
||||||
|
chapterTitle: "Advanced",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "sub-category",
|
type: "sub-category",
|
||||||
@@ -340,6 +343,7 @@ export const sidebar = numberSidebarItems(
|
|||||||
type: "link",
|
type: "link",
|
||||||
path: "/storefront-development",
|
path: "/storefront-development",
|
||||||
title: "Storefront Development",
|
title: "Storefront Development",
|
||||||
|
chapterTitle: "Storefront",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -357,6 +361,7 @@ export const sidebar = numberSidebarItems(
|
|||||||
type: "link",
|
type: "link",
|
||||||
path: "/debugging-and-testing",
|
path: "/debugging-and-testing",
|
||||||
title: "Debugging and Testing",
|
title: "Debugging and Testing",
|
||||||
|
chapterTitle: "Debugging & Testing",
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
|
|||||||
Vendored
+1
@@ -3,6 +3,7 @@ import { SidebarSectionItems, SidebarItem as SidebarItemType } from "types"
|
|||||||
export declare type SidebarItem = SidebarItemType & {
|
export declare type SidebarItem = SidebarItemType & {
|
||||||
isSoon: boolean
|
isSoon: boolean
|
||||||
number?: string
|
number?: string
|
||||||
|
chapterTitle?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare type SidebarConfig = SidebarSectionItems
|
export declare type SidebarConfig = SidebarSectionItems
|
||||||
@@ -21,13 +21,16 @@ export default function numberSidebarItems(sidebarItems, numbering = [1]) {
|
|||||||
|
|
||||||
// append current number to the item's title
|
// append current number to the item's title
|
||||||
item.number = `${numbering.join(".")}.`
|
item.number = `${numbering.join(".")}.`
|
||||||
|
item.chapterTitle = `${item.number} ${
|
||||||
|
item.chapterTitle?.trim() || item.title?.trim()
|
||||||
|
}`
|
||||||
item.title = `${item.number} ${item.title.trim()}`
|
item.title = `${item.number} ${item.title.trim()}`
|
||||||
|
|
||||||
if (isTopItems) {
|
if (isTopItems) {
|
||||||
// Add chapter category
|
// Add chapter category
|
||||||
numberedItems.push({
|
numberedItems.push({
|
||||||
type: "category",
|
type: "category",
|
||||||
title: item.title,
|
title: item.chapterTitle,
|
||||||
children: [],
|
children: [],
|
||||||
loaded: true,
|
loaded: true,
|
||||||
initialOpen: false,
|
initialOpen: false,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "API Key Module",
|
"title": "API Key Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -198,6 +199,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Auth Module",
|
"title": "Auth Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -431,6 +433,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Cart Module",
|
"title": "Cart Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -1007,6 +1010,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Currency",
|
"title": "Currency",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -1127,6 +1131,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Customer",
|
"title": "Customer",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -1447,6 +1452,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Fulfillment Module",
|
"title": "Fulfillment Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -2192,6 +2198,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Inventory Module",
|
"title": "Inventory Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -2600,6 +2607,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Order Module",
|
"title": "Order Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -3945,6 +3953,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Payment Module",
|
"title": "Payment Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -4418,6 +4427,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Pricing Module",
|
"title": "Pricing Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -4939,6 +4949,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Product Module",
|
"title": "Product Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -5629,6 +5640,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Promotion Module",
|
"title": "Promotion Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -6023,6 +6035,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Region Module",
|
"title": "Region Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -6223,6 +6236,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Sales Channel Module",
|
"title": "Sales Channel Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -6399,6 +6413,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Stock Location Module",
|
"title": "Stock Location Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -6583,6 +6598,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Store Module",
|
"title": "Store Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -6759,6 +6775,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "Tax Module",
|
"title": "Tax Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
@@ -7071,6 +7088,7 @@ export const generatedSidebar = [
|
|||||||
"isPathHref": true,
|
"isPathHref": true,
|
||||||
"type": "category",
|
"type": "category",
|
||||||
"title": "User Module",
|
"title": "User Module",
|
||||||
|
"initialOpen": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"loaded": true,
|
"loaded": true,
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "API Key Module",
|
title: "API Key Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -89,6 +90,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Auth Module",
|
title: "Auth Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -198,6 +200,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Cart Module",
|
title: "Cart Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -279,6 +282,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Currency",
|
title: "Currency",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -345,6 +349,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Customer",
|
title: "Customer",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -416,6 +421,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Fulfillment Module",
|
title: "Fulfillment Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -509,6 +515,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Inventory Module",
|
title: "Inventory Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -586,6 +593,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Order Module",
|
title: "Order Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -688,6 +696,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Payment Module",
|
title: "Payment Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -807,6 +816,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Pricing Module",
|
title: "Pricing Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -894,6 +904,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Product Module",
|
title: "Product Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -966,6 +977,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Promotion Module",
|
title: "Promotion Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -1054,6 +1066,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Region Module",
|
title: "Region Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -1120,6 +1133,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Sales Channel Module",
|
title: "Sales Channel Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -1193,6 +1207,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Stock Location Module",
|
title: "Stock Location Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -1267,6 +1282,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Store Module",
|
title: "Store Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -1333,6 +1349,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "Tax Module",
|
title: "Tax Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
@@ -1419,6 +1436,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
title: "User Module",
|
title: "User Module",
|
||||||
|
initialOpen: false,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
|
|||||||
Reference in new issue
Block a user