diff --git a/www/apps/api-reference/app/layout.tsx b/www/apps/api-reference/app/layout.tsx index ca269efdce..aff0e2ebac 100644 --- a/www/apps/api-reference/app/layout.tsx +++ b/www/apps/api-reference/app/layout.tsx @@ -58,9 +58,9 @@ export default function RootLayout({ gaId={process.env.NEXT_PUBLIC_GA_ID} > {children} diff --git a/www/apps/api-reference/markdown/admin.mdx b/www/apps/api-reference/markdown/admin.mdx index 7168c3f43a..b866601c15 100644 --- a/www/apps/api-reference/markdown/admin.mdx +++ b/www/apps/api-reference/markdown/admin.mdx @@ -17,7 +17,7 @@ import ClientLibraries from "./client-libraries.mdx" -

Medusa V2 Admin API Reference

+

Medusa V2 Admin API Reference

This API reference includes Medusa v2's Admin APIs, which are REST APIs exposed by the Medusa application. They are used to perform admin functionalities or create an admin dashboard to access and manipulate your commerce store's data. diff --git a/www/apps/api-reference/markdown/store.mdx b/www/apps/api-reference/markdown/store.mdx index 931512b807..6c5b8f58ab 100644 --- a/www/apps/api-reference/markdown/store.mdx +++ b/www/apps/api-reference/markdown/store.mdx @@ -17,7 +17,7 @@ import ClientLibraries from "./client-libraries.mdx" -

Medusa V2 Store API Reference

+

Medusa V2 Store API Reference

This API reference includes Medusa v2's Store APIs, which are REST APIs exposed by the Medusa application. They are used to create a storefront for your commerce store, such as a webshop or a commerce mobile app. diff --git a/www/apps/book/app/_not-found.mdx b/www/apps/book/app/_not-found.mdx index 5d509cb754..c023cec3cf 100644 --- a/www/apps/book/app/_not-found.mdx +++ b/www/apps/book/app/_not-found.mdx @@ -1,3 +1,7 @@ +--- +hide_content_menu: true +--- + import { CardList, H1 } from "docs-ui" import { BookOpen, @@ -10,7 +14,7 @@ export const metadata = { title: `Page Not Found`, } -

{metadata.title}

+# {metadata.title} The page you were looking for isn't available. diff --git a/www/apps/book/app/learn/customization/customize-admin/widget/page.mdx b/www/apps/book/app/learn/customization/customize-admin/widget/page.mdx index 2e62ce68ae..0e8946ccdc 100644 --- a/www/apps/book/app/learn/customization/customize-admin/widget/page.mdx +++ b/www/apps/book/app/learn/customization/customize-admin/widget/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Prerequisites } from "docs-ui" export const metadata = { diff --git a/www/apps/book/app/learn/customization/extend-features/define-link/page.mdx b/www/apps/book/app/learn/customization/extend-features/define-link/page.mdx index af9d0d1a00..dfc6b93572 100644 --- a/www/apps/book/app/learn/customization/extend-features/define-link/page.mdx +++ b/www/apps/book/app/learn/customization/extend-features/define-link/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Prerequisites } from "docs-ui" export const metadata = { diff --git a/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx b/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx index feca6ddedc..568dd8cb3d 100644 --- a/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx +++ b/www/apps/book/app/learn/customization/extend-features/extend-create-product/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Prerequisites } from "docs-ui" export const metadata = { diff --git a/www/apps/book/app/learn/customization/extend-features/query-linked-records/page.mdx b/www/apps/book/app/learn/customization/extend-features/query-linked-records/page.mdx index da7b104ec9..826e732779 100644 --- a/www/apps/book/app/learn/customization/extend-features/query-linked-records/page.mdx +++ b/www/apps/book/app/learn/customization/extend-features/query-linked-records/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Prerequisites } from "docs-ui" export const metadata = { diff --git a/www/apps/book/components/MDXComponents/index.tsx b/www/apps/book/components/MDXComponents/index.tsx index 215dde22c2..aa8f2bcbac 100644 --- a/www/apps/book/components/MDXComponents/index.tsx +++ b/www/apps/book/components/MDXComponents/index.tsx @@ -1,10 +1,9 @@ import type { MDXComponents as MDXComponentsType } from "mdx/types" -import { Link, MDXComponents as UiMdxComponents } from "docs-ui" +import { MDXComponents as UiMdxComponents } from "docs-ui" import Feedback from "../Feedback" const MDXComponents: MDXComponentsType = { ...UiMdxComponents, - a: Link, Feedback, } diff --git a/www/apps/book/config/index.ts b/www/apps/book/config/index.ts index b571dce59d..6a9f4523c0 100644 --- a/www/apps/book/config/index.ts +++ b/www/apps/book/config/index.ts @@ -1,6 +1,7 @@ import { DocsConfig, Sidebar } from "types" import { globalConfig } from "docs-ui" import { generatedSidebars } from "../generated/sidebar.mjs" +import { basePathUrl } from "../utils/base-path-url" const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000" @@ -23,4 +24,11 @@ export const config: DocsConfig = { }, ], }, + version: { + ...globalConfig.version, + bannerImage: { + light: basePathUrl("/images/get-started-card.png"), + dark: basePathUrl("/images/get-started-card-dark.png"), + }, + }, } diff --git a/www/apps/book/next.config.mjs b/www/apps/book/next.config.mjs index 2e396aa1f0..f26d2bb240 100644 --- a/www/apps/book/next.config.mjs +++ b/www/apps/book/next.config.mjs @@ -7,11 +7,15 @@ import { cloudinaryImgRehypePlugin, pageNumberRehypePlugin, crossProjectLinksPlugin, + recmaInjectMdxDataPlugin, + remarkAttachFrontmatterDataPlugin, } from "remark-rehype-plugins" import path from "path" import redirects from "./utils/redirects.mjs" import { generatedSidebars } from "./generated/sidebar.mjs" import { catchBadRedirects } from "build-scripts" +import remarkFrontmatter from "remark-frontmatter" +import withExtractedTableOfContents from "@stefanprobst/rehype-extract-toc" const withMDX = mdx({ extension: /\.mdx?$/, @@ -90,7 +94,10 @@ const withMDX = mdx({ sidebar: generatedSidebars[0].items, }, ], + [withExtractedTableOfContents], ], + remarkPlugins: [[remarkFrontmatter], [remarkAttachFrontmatterDataPlugin]], + recmaPlugins: [[recmaInjectMdxDataPlugin]], jsx: true, }, }) diff --git a/www/apps/book/package.json b/www/apps/book/package.json index 58bff7ac15..628aa83a25 100644 --- a/www/apps/book/package.json +++ b/www/apps/book/package.json @@ -18,6 +18,7 @@ "@mdx-js/react": "^3.1.0", "@medusajs/icons": "2.8.3", "@next/mdx": "15.3.1", + "@stefanprobst/rehype-extract-toc": "^3.0.0", "clsx": "^2.1.0", "docs-ui": "*", "docs-utils": "*", @@ -26,6 +27,7 @@ "react-dom": "rc", "rehype-mdx-code-props": "^2.0.0", "rehype-slug": "^6.0.0", + "remark-frontmatter": "^5.0.0", "remark-rehype-plugins": "*" }, "devDependencies": { diff --git a/www/apps/resources/app/admin-components/page.mdx b/www/apps/resources/app/admin-components/page.mdx index 0606c53f65..f01a2e9457 100644 --- a/www/apps/resources/app/admin-components/page.mdx +++ b/www/apps/resources/app/admin-components/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/api-key/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/api-key/links-to-other-modules/page.mdx index 7a01312ba1..cee52b4afe 100644 --- a/www/apps/resources/app/commerce-modules/api-key/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/api-key/links-to-other-modules/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - sales channel +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/api-key/page.mdx b/www/apps/resources/app/commerce-modules/api-key/page.mdx index bbc4e5bcef..7fe89dc49c 100644 --- a/www/apps/resources/app/commerce-modules/api-key/page.mdx +++ b/www/apps/resources/app/commerce-modules/api-key/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab, ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/auth/page.mdx b/www/apps/resources/app/commerce-modules/auth/page.mdx index af64a53563..5319067836 100644 --- a/www/apps/resources/app/commerce-modules/auth/page.mdx +++ b/www/apps/resources/app/commerce-modules/auth/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab, ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/cart/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/cart/links-to-other-modules/page.mdx index 5f60d79939..75a36b246e 100644 --- a/www/apps/resources/app/commerce-modules/cart/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/links-to-other-modules/page.mdx @@ -1,3 +1,14 @@ +--- +products: + - customer + - order + - payment + - product + - promotion + - region + - sales channel +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/cart/page.mdx b/www/apps/resources/app/commerce-modules/cart/page.mdx index b44b6d4e6a..f743d0f8e1 100644 --- a/www/apps/resources/app/commerce-modules/cart/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx b/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx index 636c9474ff..99ba818a1c 100644 --- a/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/promotions/page.mdx @@ -1,5 +1,7 @@ --- sidebar_label: "Promotions Adjustments" +products: + - promotion --- export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/cart/tax-lines/page.mdx b/www/apps/resources/app/commerce-modules/cart/tax-lines/page.mdx index eef445342c..cff3041ffd 100644 --- a/www/apps/resources/app/commerce-modules/cart/tax-lines/page.mdx +++ b/www/apps/resources/app/commerce-modules/cart/tax-lines/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - tax +--- + export const metadata = { title: `Tax Lines in Cart Module`, } diff --git a/www/apps/resources/app/commerce-modules/currency/page.mdx b/www/apps/resources/app/commerce-modules/currency/page.mdx index 69cc95153f..ecb1a56fcf 100644 --- a/www/apps/resources/app/commerce-modules/currency/page.mdx +++ b/www/apps/resources/app/commerce-modules/currency/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/customer/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/customer/links-to-other-modules/page.mdx index 1a5195eb40..340ba0b630 100644 --- a/www/apps/resources/app/commerce-modules/customer/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/customer/links-to-other-modules/page.mdx @@ -1,3 +1,10 @@ +--- +products: + - payment + - cart + - order +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/customer/page.mdx b/www/apps/resources/app/commerce-modules/customer/page.mdx index 8fc3558316..9ea98e20fc 100644 --- a/www/apps/resources/app/commerce-modules/customer/page.mdx +++ b/www/apps/resources/app/commerce-modules/customer/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/fulfillment/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/fulfillment/links-to-other-modules/page.mdx index 7aa4e9f045..8fd9087dfc 100644 --- a/www/apps/resources/app/commerce-modules/fulfillment/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/fulfillment/links-to-other-modules/page.mdx @@ -1,3 +1,11 @@ +--- +products: + - order + - pricing + - product + - stock location +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx index bc258f5516..90c0b5f937 100644 --- a/www/apps/resources/app/commerce-modules/fulfillment/page.mdx +++ b/www/apps/resources/app/commerce-modules/fulfillment/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx b/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx index ce8d32731b..77882f4f1f 100644 --- a/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/inventory-kit/page.mdx @@ -4,6 +4,9 @@ tags: - product - stock location - concept +products: + - product + - stock location --- export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/inventory/page.mdx b/www/apps/resources/app/commerce-modules/inventory/page.mdx index 461b123451..9dea92c703 100644 --- a/www/apps/resources/app/commerce-modules/inventory/page.mdx +++ b/www/apps/resources/app/commerce-modules/inventory/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/order/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/order/links-to-other-modules/page.mdx index 1af4d68bfe..559781cdeb 100644 --- a/www/apps/resources/app/commerce-modules/order/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/links-to-other-modules/page.mdx @@ -1,3 +1,15 @@ +--- +products: + - customer + - cart + - fulfillment + - payment + - product + - promotion + - region + - sales channel +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/order/page.mdx b/www/apps/resources/app/commerce-modules/order/page.mdx index dc9aa02ac3..87b8472df9 100644 --- a/www/apps/resources/app/commerce-modules/order/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx b/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx index 06f8f8ac78..ecb6afa2be 100644 --- a/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/promotion-adjustments/page.mdx @@ -1,5 +1,7 @@ --- sidebar_label: "Promotions Adjustments" +products: + - promotion --- export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/order/tax-lines/page.mdx b/www/apps/resources/app/commerce-modules/order/tax-lines/page.mdx index 3514048ea6..2b5fcd3d04 100644 --- a/www/apps/resources/app/commerce-modules/order/tax-lines/page.mdx +++ b/www/apps/resources/app/commerce-modules/order/tax-lines/page.mdx @@ -1,5 +1,7 @@ --- sidebar_label: "Tax Lines" +products: + - tax --- export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/payment/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/payment/links-to-other-modules/page.mdx index 96419373ac..27ac0e0dc3 100644 --- a/www/apps/resources/app/commerce-modules/payment/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/links-to-other-modules/page.mdx @@ -1,3 +1,11 @@ +--- +products: + - cart + - customer + - order + - region +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/payment/page.mdx b/www/apps/resources/app/commerce-modules/payment/page.mdx index 0829663cb4..5d5b7d3e15 100644 --- a/www/apps/resources/app/commerce-modules/payment/page.mdx +++ b/www/apps/resources/app/commerce-modules/payment/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab, ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/pricing/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/pricing/links-to-other-modules/page.mdx index 2d7b2ac51f..78d3fe1de4 100644 --- a/www/apps/resources/app/commerce-modules/pricing/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/pricing/links-to-other-modules/page.mdx @@ -1,3 +1,9 @@ +--- +products: + - fulfillment + - product +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/pricing/page.mdx b/www/apps/resources/app/commerce-modules/pricing/page.mdx index c42776dc36..6089449715 100644 --- a/www/apps/resources/app/commerce-modules/pricing/page.mdx +++ b/www/apps/resources/app/commerce-modules/pricing/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/product/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/product/links-to-other-modules/page.mdx index ce82f3a68f..38947e2744 100644 --- a/www/apps/resources/app/commerce-modules/product/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/links-to-other-modules/page.mdx @@ -1,3 +1,13 @@ +--- +products: + - cart + - fulfillment + - inventory + - order + - pricing + - sales channel +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/product/page.mdx b/www/apps/resources/app/commerce-modules/product/page.mdx index 174e4d22dd..4a04c3a4e2 100644 --- a/www/apps/resources/app/commerce-modules/product/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/product/selling-products/page.mdx b/www/apps/resources/app/commerce-modules/product/selling-products/page.mdx index 8b62328594..3a189a2f37 100644 --- a/www/apps/resources/app/commerce-modules/product/selling-products/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/selling-products/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Product Shipping Requirement" tags: - concept - fulfillment +products: + - fulfillment --- import { Table } from "docs-ui" diff --git a/www/apps/resources/app/commerce-modules/product/variant-inventory/page.mdx b/www/apps/resources/app/commerce-modules/product/variant-inventory/page.mdx index 2948919f31..1206a6b840 100644 --- a/www/apps/resources/app/commerce-modules/product/variant-inventory/page.mdx +++ b/www/apps/resources/app/commerce-modules/product/variant-inventory/page.mdx @@ -5,6 +5,10 @@ tags: - inventory - stock location - sales channel +products: + - inventory + - stock location + - sales channel --- export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/promotion/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/promotion/links-to-other-modules/page.mdx index a7bc2da28c..5f6bd57102 100644 --- a/www/apps/resources/app/commerce-modules/promotion/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/promotion/links-to-other-modules/page.mdx @@ -1,3 +1,9 @@ +--- +products: + - cart + - order +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/promotion/page.mdx b/www/apps/resources/app/commerce-modules/promotion/page.mdx index b815bd0422..3c416b1c2a 100644 --- a/www/apps/resources/app/commerce-modules/promotion/page.mdx +++ b/www/apps/resources/app/commerce-modules/promotion/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/region/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/region/links-to-other-modules/page.mdx index e63e964efc..6887605530 100644 --- a/www/apps/resources/app/commerce-modules/region/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/region/links-to-other-modules/page.mdx @@ -1,3 +1,10 @@ +--- +products: + - cart + - order + - payment +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/region/page.mdx b/www/apps/resources/app/commerce-modules/region/page.mdx index 789df05e2a..ec3fa001b3 100644 --- a/www/apps/resources/app/commerce-modules/region/page.mdx +++ b/www/apps/resources/app/commerce-modules/region/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/sales-channel/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/sales-channel/links-to-other-modules/page.mdx index c71c2ac55f..6bbba83b59 100644 --- a/www/apps/resources/app/commerce-modules/sales-channel/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/sales-channel/links-to-other-modules/page.mdx @@ -1,3 +1,12 @@ +--- +products: + - api key + - cart + - order + - product + - stock location +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/sales-channel/page.mdx b/www/apps/resources/app/commerce-modules/sales-channel/page.mdx index 3207e85ccf..b37542ff23 100644 --- a/www/apps/resources/app/commerce-modules/sales-channel/page.mdx +++ b/www/apps/resources/app/commerce-modules/sales-channel/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/sales-channel/publishable-api-keys/page.mdx b/www/apps/resources/app/commerce-modules/sales-channel/publishable-api-keys/page.mdx index d423610c53..94d80c0dde 100644 --- a/www/apps/resources/app/commerce-modules/sales-channel/publishable-api-keys/page.mdx +++ b/www/apps/resources/app/commerce-modules/sales-channel/publishable-api-keys/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - api key +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/stock-location/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/stock-location/links-to-other-modules/page.mdx index 864fde4804..bcfce3b78c 100644 --- a/www/apps/resources/app/commerce-modules/stock-location/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/stock-location/links-to-other-modules/page.mdx @@ -1,3 +1,10 @@ +--- +products: + - fulfillment + - inventory + - sales channel +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/stock-location/page.mdx b/www/apps/resources/app/commerce-modules/stock-location/page.mdx index 0ebb399d16..8d2a13299a 100644 --- a/www/apps/resources/app/commerce-modules/stock-location/page.mdx +++ b/www/apps/resources/app/commerce-modules/stock-location/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/store/links-to-other-modules/page.mdx b/www/apps/resources/app/commerce-modules/store/links-to-other-modules/page.mdx index 0ac7c92c9f..dc821e6597 100644 --- a/www/apps/resources/app/commerce-modules/store/links-to-other-modules/page.mdx +++ b/www/apps/resources/app/commerce-modules/store/links-to-other-modules/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - currency +--- + import { CodeTabs, CodeTab, Table } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/store/page.mdx b/www/apps/resources/app/commerce-modules/store/page.mdx index fdc21a7b14..ffb81f6219 100644 --- a/www/apps/resources/app/commerce-modules/store/page.mdx +++ b/www/apps/resources/app/commerce-modules/store/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/tax/page.mdx b/www/apps/resources/app/commerce-modules/tax/page.mdx index 45b7c10fe1..66dcce966f 100644 --- a/www/apps/resources/app/commerce-modules/tax/page.mdx +++ b/www/apps/resources/app/commerce-modules/tax/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/commerce-modules/user/page.mdx b/www/apps/resources/app/commerce-modules/user/page.mdx index 0713837ba7..aaab5fb6bd 100644 --- a/www/apps/resources/app/commerce-modules/user/page.mdx +++ b/www/apps/resources/app/commerce-modules/user/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { CodeTabs, CodeTab } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/examples/guides/custom-item-price/page.mdx b/www/apps/resources/app/examples/guides/custom-item-price/page.mdx index 005534f2f3..f61c04f6d3 100644 --- a/www/apps/resources/app/examples/guides/custom-item-price/page.mdx +++ b/www/apps/resources/app/examples/guides/custom-item-price/page.mdx @@ -5,6 +5,11 @@ tags: - pricing - server - tutorial + - product +products: + - cart + - pricing + - product --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/examples/guides/quote-management/page.mdx b/www/apps/resources/app/examples/guides/quote-management/page.mdx index 3dc73c7f25..2e6080dae6 100644 --- a/www/apps/resources/app/examples/guides/quote-management/page.mdx +++ b/www/apps/resources/app/examples/guides/quote-management/page.mdx @@ -5,6 +5,10 @@ tags: - order - server - tutorial +products: + - cart + - order + - customer --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/how-to-tutorials/page.mdx b/www/apps/resources/app/how-to-tutorials/page.mdx index 6c8c8b41e6..d257409939 100644 --- a/www/apps/resources/app/how-to-tutorials/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/abandoned-cart/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/abandoned-cart/page.mdx index f7ed2f50d1..5b8d1d1327 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/abandoned-cart/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/abandoned-cart/page.mdx @@ -6,6 +6,8 @@ tags: - server - tutorial - notification +products: + - cart --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/loyalty-points/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/loyalty-points/page.mdx index 55a288a67d..92e962dfaf 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/loyalty-points/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/loyalty-points/page.mdx @@ -11,6 +11,11 @@ tags: label: "Implement Loyalty Points" - name: promotion label: "Implement Loyalty Points" +products: + - cart + - order + - customer + - promotion --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/phone-auth/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/phone-auth/page.mdx index 186be8c0d2..6dd23b5719 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/phone-auth/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/phone-auth/page.mdx @@ -7,6 +7,9 @@ tags: label: "Implement Phone Authentication" - server - tutorial +products: + - customer + - auth --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx index fbbd8b42e3..0ea2ed2329 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx @@ -5,6 +5,9 @@ tags: label: "Implement Product Reviews" - server - tutorial +products: + - product + - customer --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/re-order/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/re-order/page.mdx index c13511dc60..865f6a26d7 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/re-order/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/re-order/page.mdx @@ -5,6 +5,8 @@ tags: label: "Implement Re-Order" - server - tutorial +products: + - order --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/saved-payment-methods/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/saved-payment-methods/page.mdx index 7560e82981..4f7383f531 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/saved-payment-methods/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/saved-payment-methods/page.mdx @@ -11,6 +11,8 @@ keywords: - payment provider - checkout - nextjs +products: + - payment --- import { Github, PlaySolid, EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/resources/app/integrations/guides/algolia/page.mdx b/www/apps/resources/app/integrations/guides/algolia/page.mdx index b7ddb6183f..0910643f02 100644 --- a/www/apps/resources/app/integrations/guides/algolia/page.mdx +++ b/www/apps/resources/app/integrations/guides/algolia/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Card, Prerequisites, Details, WorkflowDiagram } from "docs-ui" import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/integrations/guides/contentful/page.mdx b/www/apps/resources/app/integrations/guides/contentful/page.mdx index 70e19ed282..3b00167328 100644 --- a/www/apps/resources/app/integrations/guides/contentful/page.mdx +++ b/www/apps/resources/app/integrations/guides/contentful/page.mdx @@ -5,6 +5,8 @@ tags: - name: product label: "Localization with Contentful" - tutorial +products: + - product --- import { Card, Prerequisites, Details, WorkflowDiagram } from "docs-ui" diff --git a/www/apps/resources/app/integrations/guides/magento/page.mdx b/www/apps/resources/app/integrations/guides/magento/page.mdx index acb2094fcc..2fee689fc4 100644 --- a/www/apps/resources/app/integrations/guides/magento/page.mdx +++ b/www/apps/resources/app/integrations/guides/magento/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Card, Prerequisites, WorkflowDiagram } from "docs-ui" import { Github } from "@medusajs/icons" diff --git a/www/apps/resources/app/integrations/guides/resend/page.mdx b/www/apps/resources/app/integrations/guides/resend/page.mdx index cf0926b258..a96d46c10f 100644 --- a/www/apps/resources/app/integrations/guides/resend/page.mdx +++ b/www/apps/resources/app/integrations/guides/resend/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - order +--- + import { Card, Prerequisites, Details } from "docs-ui" import { Github } from "@medusajs/icons" diff --git a/www/apps/resources/app/integrations/guides/sanity/page.mdx b/www/apps/resources/app/integrations/guides/sanity/page.mdx index be8a3b11cd..0acda0052d 100644 --- a/www/apps/resources/app/integrations/guides/sanity/page.mdx +++ b/www/apps/resources/app/integrations/guides/sanity/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Card, Prerequisites, Details } from "docs-ui" import { Github } from "@medusajs/icons" diff --git a/www/apps/resources/app/integrations/guides/segment/page.mdx b/www/apps/resources/app/integrations/guides/segment/page.mdx index 9d653975ab..deb43f2ca5 100644 --- a/www/apps/resources/app/integrations/guides/segment/page.mdx +++ b/www/apps/resources/app/integrations/guides/segment/page.mdx @@ -4,6 +4,8 @@ tags: - server - tutorial - analytics +products: + - order --- import { Card, Prerequisites, Details, WorkflowDiagram } from "docs-ui" diff --git a/www/apps/resources/app/integrations/guides/shipstation/page.mdx b/www/apps/resources/app/integrations/guides/shipstation/page.mdx index 71ed79f9fa..53ceb577e9 100644 --- a/www/apps/resources/app/integrations/guides/shipstation/page.mdx +++ b/www/apps/resources/app/integrations/guides/shipstation/page.mdx @@ -1,3 +1,10 @@ +--- +products: + - fulfillment + - cart + - order +--- + import { Card, Prerequisites, Details } from "docs-ui" import { Github } from "@medusajs/icons" diff --git a/www/apps/resources/app/medusa-cli/page.mdx b/www/apps/resources/app/medusa-cli/page.mdx index 1718e7093e..35462fb7a8 100644 --- a/www/apps/resources/app/medusa-cli/page.mdx +++ b/www/apps/resources/app/medusa-cli/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { Table, Prerequisites, ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/medusa-workflows-reference/page.mdx b/www/apps/resources/app/medusa-workflows-reference/page.mdx index 1c04113af6..1957cbb3fb 100644 --- a/www/apps/resources/app/medusa-workflows-reference/page.mdx +++ b/www/apps/resources/app/medusa-workflows-reference/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/nextjs-starter/guides/customize-stripe/page.mdx b/www/apps/resources/app/nextjs-starter/guides/customize-stripe/page.mdx index 941d44c911..ff1038ed9f 100644 --- a/www/apps/resources/app/nextjs-starter/guides/customize-stripe/page.mdx +++ b/www/apps/resources/app/nextjs-starter/guides/customize-stripe/page.mdx @@ -2,6 +2,8 @@ tags: - storefront - payment +products: + - payment --- import { Prerequisites } from "docs-ui" diff --git a/www/apps/resources/app/not-found.mdx b/www/apps/resources/app/not-found.mdx index b1ec4b992c..ae7c7466ff 100644 --- a/www/apps/resources/app/not-found.mdx +++ b/www/apps/resources/app/not-found.mdx @@ -1,3 +1,7 @@ +--- +hide_content_menu: true +--- + import { CardList, H1 } from "docs-ui" import { BookOpen, @@ -10,7 +14,7 @@ export const metadata = { title: `Page Not Found`, } -

{metadata.title}

+# {metadata.title} The page you were looking for isn't available. diff --git a/www/apps/resources/app/plugins/guides/wishlist/page.mdx b/www/apps/resources/app/plugins/guides/wishlist/page.mdx index df947b9a49..eb28fc67cc 100644 --- a/www/apps/resources/app/plugins/guides/wishlist/page.mdx +++ b/www/apps/resources/app/plugins/guides/wishlist/page.mdx @@ -4,6 +4,10 @@ tags: - product - tutorial - server +products: + - product + - customer + - sales channel --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/recipes/b2b/page.mdx b/www/apps/resources/app/recipes/b2b/page.mdx index 0d12fb91ec..4b2c7ae34b 100644 --- a/www/apps/resources/app/recipes/b2b/page.mdx +++ b/www/apps/resources/app/recipes/b2b/page.mdx @@ -1,3 +1,11 @@ +--- +products: + - product + - customer + - sales channel + - pricing +--- + import { AcademicCapSolid, UsersSolid } from "@medusajs/icons" export const metadata = { diff --git a/www/apps/resources/app/recipes/bundled-products/examples/standard/page.mdx b/www/apps/resources/app/recipes/bundled-products/examples/standard/page.mdx index 9bc94bc96f..8dc74980dc 100644 --- a/www/apps/resources/app/recipes/bundled-products/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/bundled-products/examples/standard/page.mdx @@ -7,6 +7,9 @@ tags: - tutorial - name: product label: "Implement Bundled Products" +products: + - cart + - product --- import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/recipes/bundled-products/page.mdx b/www/apps/resources/app/recipes/bundled-products/page.mdx index 2bc26d9eaa..bf935c2470 100644 --- a/www/apps/resources/app/recipes/bundled-products/page.mdx +++ b/www/apps/resources/app/recipes/bundled-products/page.mdx @@ -1,5 +1,10 @@ +--- +products: + - product + - cart +--- + import { AcademicCapSolid, PuzzleSolid } from "@medusajs/icons"; -import { ChildDocs } from "docs-ui" export const metadata = { title: `Bundled Products Recipe`, diff --git a/www/apps/resources/app/recipes/commerce-automation/page.mdx b/www/apps/resources/app/recipes/commerce-automation/page.mdx index c4774499f9..0802547ccf 100644 --- a/www/apps/resources/app/recipes/commerce-automation/page.mdx +++ b/www/apps/resources/app/recipes/commerce-automation/page.mdx @@ -1,3 +1,10 @@ +--- +products: + - product + - customer + - order +--- + import { AcademicCapSolid, BoltSolid } from "@medusajs/icons" export const metadata = { diff --git a/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx b/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx index 3879a0cf32..3c315c4f5e 100644 --- a/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx +++ b/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx @@ -1,3 +1,10 @@ +--- +products: + - product + - sales channel + - inventory +--- + import { Card, Prerequisites, Details, WorkflowDiagram } from "docs-ui" import { Github } from "@medusajs/icons" diff --git a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx index 10afe85bd7..8bca54bfdf 100644 --- a/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/digital-products/examples/standard/page.mdx @@ -1,3 +1,11 @@ +--- +products: + - product + - fulfillment + - cart + - order +--- + import { Github, PlaySolid } from "@medusajs/icons" import { Prerequisites } from "docs-ui" diff --git a/www/apps/resources/app/recipes/digital-products/page.mdx b/www/apps/resources/app/recipes/digital-products/page.mdx index ec0db79c5e..1b252e07e2 100644 --- a/www/apps/resources/app/recipes/digital-products/page.mdx +++ b/www/apps/resources/app/recipes/digital-products/page.mdx @@ -1,5 +1,10 @@ +--- +products: + - product + - order + - fulfillment +--- import { AcademicCapSolid, BoltSolid, PuzzleSolid } from "@medusajs/icons" -import { ChildDocs } from "docs-ui" export const metadata = { title: `Digital Products Recipe`, diff --git a/www/apps/resources/app/recipes/erp/odoo/page.mdx b/www/apps/resources/app/recipes/erp/odoo/page.mdx index 2ffa869cfc..19f588c77b 100644 --- a/www/apps/resources/app/recipes/erp/odoo/page.mdx +++ b/www/apps/resources/app/recipes/erp/odoo/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { Prerequisites, WorkflowDiagram } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/recipes/erp/page.mdx b/www/apps/resources/app/recipes/erp/page.mdx index 20ac5f2cda..e764f92be7 100644 --- a/www/apps/resources/app/recipes/erp/page.mdx +++ b/www/apps/resources/app/recipes/erp/page.mdx @@ -1,3 +1,12 @@ +--- +products: + - product + - pricing + - cart + - order + - inventory +--- + import { Prerequisites } from "docs-ui" export const ogImage = "https://res.cloudinary.com/dza7lstvk/image/upload/v1740556002/Medusa%20Resources/erp-guide_sucmxz.jpg" diff --git a/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx b/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx index 7ab081312c..29fb52df46 100644 --- a/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx +++ b/www/apps/resources/app/recipes/marketplace/examples/restaurant-delivery/page.mdx @@ -1,3 +1,12 @@ +--- +products: + - fulfillment + - order + - product + - cart + - auth +--- + import { WorkflowDiagram, Prerequisites } from "docs-ui" import { Github, PlaySolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx index 830dabed92..69243e3000 100644 --- a/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx +++ b/www/apps/resources/app/recipes/marketplace/examples/vendors/page.mdx @@ -1,3 +1,9 @@ +--- +products: + - product + - order +--- + import { Github, PlaySolid } from "@medusajs/icons" import { Prerequisites, WorkflowDiagram } from "docs-ui" diff --git a/www/apps/resources/app/recipes/marketplace/page.mdx b/www/apps/resources/app/recipes/marketplace/page.mdx index 84f421026e..0bd9ae708b 100644 --- a/www/apps/resources/app/recipes/marketplace/page.mdx +++ b/www/apps/resources/app/recipes/marketplace/page.mdx @@ -1,3 +1,9 @@ +--- +products: + - product + - order +--- + import { ChildDocs } from "docs-ui" import { AcademicCapSolid } from "@medusajs/icons" diff --git a/www/apps/resources/app/recipes/multi-region-store/page.mdx b/www/apps/resources/app/recipes/multi-region-store/page.mdx index 692ceb06c2..e0ed161bc9 100644 --- a/www/apps/resources/app/recipes/multi-region-store/page.mdx +++ b/www/apps/resources/app/recipes/multi-region-store/page.mdx @@ -1,3 +1,13 @@ +--- +products: + - region + - currency + - tax + - payment + - fulfillment + - pricing +--- + import { AcademicCapSolid, UsersSolid } from "@medusajs/icons" export const metadata = { diff --git a/www/apps/resources/app/recipes/omnichannel/page.mdx b/www/apps/resources/app/recipes/omnichannel/page.mdx index 3dbab7fbd9..ccf00fabe4 100644 --- a/www/apps/resources/app/recipes/omnichannel/page.mdx +++ b/www/apps/resources/app/recipes/omnichannel/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - sales channel +--- + import { AcademicCapSolid, BoltSolid } from "@medusajs/icons" export const metadata = { diff --git a/www/apps/resources/app/recipes/oms/page.mdx b/www/apps/resources/app/recipes/oms/page.mdx index 50fc73013d..ca3a4cfb5e 100644 --- a/www/apps/resources/app/recipes/oms/page.mdx +++ b/www/apps/resources/app/recipes/oms/page.mdx @@ -1,3 +1,11 @@ +--- +products: + - order + - fulfillment + - inventory + - sales channel +--- + import { AcademicCapSolid, BoltSolid } from "@medusajs/icons" import { LearningPath } from "docs-ui" diff --git a/www/apps/resources/app/recipes/personalized-products/page.mdx b/www/apps/resources/app/recipes/personalized-products/page.mdx index aa0169e1a7..317a4ecceb 100644 --- a/www/apps/resources/app/recipes/personalized-products/page.mdx +++ b/www/apps/resources/app/recipes/personalized-products/page.mdx @@ -1,3 +1,9 @@ +--- +products: + - product + - order +--- + import { AcademicCapSolid, NextJs } from "@medusajs/icons" export const metadata = { diff --git a/www/apps/resources/app/recipes/pos/page.mdx b/www/apps/resources/app/recipes/pos/page.mdx index b9789401a0..a0c13f9556 100644 --- a/www/apps/resources/app/recipes/pos/page.mdx +++ b/www/apps/resources/app/recipes/pos/page.mdx @@ -1,3 +1,12 @@ +--- +products: + - product + - inventory + - order + - sales channel + - payment +--- + import { AcademicCapSolid } from "@medusajs/icons" export const metadata = { diff --git a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx index 8c8ce9c18b..48a8c18c32 100644 --- a/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx +++ b/www/apps/resources/app/recipes/subscriptions/examples/standard/page.mdx @@ -1,3 +1,11 @@ +--- +products: + - order + - payment + - cart + - customer +--- + import { Github, PlaySolid, EllipsisHorizontal } from "@medusajs/icons" import { Prerequisites, InlineIcon } from "docs-ui" diff --git a/www/apps/resources/app/recipes/subscriptions/page.mdx b/www/apps/resources/app/recipes/subscriptions/page.mdx index 6de2c713a0..0a5d0d15e3 100644 --- a/www/apps/resources/app/recipes/subscriptions/page.mdx +++ b/www/apps/resources/app/recipes/subscriptions/page.mdx @@ -1,3 +1,9 @@ +--- +products: + - order + - payment +--- + import { AcademicCapSolid, Github } from "@medusajs/icons" export const metadata = { diff --git a/www/apps/resources/app/references/[...slug]/page.tsx b/www/apps/resources/app/references/[...slug]/page.tsx index 20e816fc02..6e6989f88a 100644 --- a/www/apps/resources/app/references/[...slug]/page.tsx +++ b/www/apps/resources/app/references/[...slug]/page.tsx @@ -8,12 +8,14 @@ import { localLinksRehypePlugin, workflowDiagramLinkFixerPlugin, prerequisitesLinkFixerPlugin, + recmaInjectMdxDataPlugin, } from "remark-rehype-plugins" import MDXComponents from "@/components/MDXComponents" import mdxOptions from "../../../mdx-options.mjs" import { filesMap } from "../../../generated/files-map.mjs" import { Metadata } from "next" -import { cache } from "react" +import { cache, Suspense } from "react" +import { Loading } from "docs-ui" type PageProps = { params: Promise<{ @@ -37,40 +39,50 @@ export default async function ReferencesPage(props: PageProps) { } return ( - + }> +
+ +
+
) } diff --git a/www/apps/resources/app/storefront-development/cart/context/page.mdx b/www/apps/resources/app/storefront-development/cart/context/page.mdx index df83890c9c..5da7ea6178 100644 --- a/www/apps/resources/app/storefront-development/cart/context/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/context/page.mdx @@ -2,6 +2,8 @@ tags: - cart - storefront +products: + - cart --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/cart/create/page.mdx b/www/apps/resources/app/storefront-development/cart/create/page.mdx index 5d61bf694f..b9d2641e2a 100644 --- a/www/apps/resources/app/storefront-development/cart/create/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/create/page.mdx @@ -2,6 +2,8 @@ tags: - cart - storefront +products: + - cart --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx b/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx index 3370828e33..dda762a3f7 100644 --- a/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/manage-items/page.mdx @@ -2,6 +2,8 @@ tags: - cart - storefront +products: + - cart --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/cart/page.mdx b/www/apps/resources/app/storefront-development/cart/page.mdx index bbc577d01a..8ab73d04a4 100644 --- a/www/apps/resources/app/storefront-development/cart/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - cart +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx b/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx index 3771aec003..40e5b3a8af 100644 --- a/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/retrieve/page.mdx @@ -2,6 +2,8 @@ tags: - cart - storefront +products: + - cart --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/cart/totals/page.mdx b/www/apps/resources/app/storefront-development/cart/totals/page.mdx index 2ea784982c..e7c0afa969 100644 --- a/www/apps/resources/app/storefront-development/cart/totals/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/totals/page.mdx @@ -2,6 +2,8 @@ tags: - cart - storefront +products: + - cart --- import { CodeTabs, CodeTab, Table } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/cart/update/page.mdx b/www/apps/resources/app/storefront-development/cart/update/page.mdx index 849fe49605..4d82a8d742 100644 --- a/www/apps/resources/app/storefront-development/cart/update/page.mdx +++ b/www/apps/resources/app/storefront-development/cart/update/page.mdx @@ -2,6 +2,9 @@ tags: - cart - storefront +products: + - cart + - customer --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/checkout/address/page.mdx b/www/apps/resources/app/storefront-development/checkout/address/page.mdx index 2b71901f9b..e222b8c6d0 100644 --- a/www/apps/resources/app/storefront-development/checkout/address/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/address/page.mdx @@ -3,6 +3,9 @@ sidebar_label: "Checkout Step 2: Set Address" tags: - cart - storefront +products: + - cart + - customer --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx b/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx index e75febdfe7..797a7e492a 100644 --- a/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/complete-cart/page.mdx @@ -4,6 +4,10 @@ tags: - order - payment - storefront +products: + - cart + - order + - payment --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/checkout/email/page.mdx b/www/apps/resources/app/storefront-development/checkout/email/page.mdx index fb27d65c87..b18dcd6a6f 100644 --- a/www/apps/resources/app/storefront-development/checkout/email/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/email/page.mdx @@ -2,6 +2,8 @@ tags: - cart - storefront +products: + - cart --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/checkout/order-confirmation/page.mdx b/www/apps/resources/app/storefront-development/checkout/order-confirmation/page.mdx index be2e1bd891..c62a7d5ee4 100644 --- a/www/apps/resources/app/storefront-development/checkout/order-confirmation/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/order-confirmation/page.mdx @@ -2,6 +2,8 @@ tags: - order - storefront +products: + - order --- import { CodeTabs, CodeTab, Table } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/checkout/page.mdx b/www/apps/resources/app/storefront-development/checkout/page.mdx index f295639b61..f23022e30e 100644 --- a/www/apps/resources/app/storefront-development/checkout/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/page.mdx @@ -1,3 +1,12 @@ +--- +products: + - cart + - customer + - payment + - fulfillment + - order +--- + export const metadata = { title: `Checkout in Storefront`, } diff --git a/www/apps/resources/app/storefront-development/checkout/payment/page.mdx b/www/apps/resources/app/storefront-development/checkout/payment/page.mdx index c7c296d8e7..35fff0fc44 100644 --- a/www/apps/resources/app/storefront-development/checkout/payment/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/payment/page.mdx @@ -3,6 +3,9 @@ tags: - cart - storefront - payment +products: + - cart + - payment --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx b/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx index ba383d2290..cd2f5d4159 100644 --- a/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx @@ -4,6 +4,9 @@ tags: - storefront - stripe - payment +products: + - cart + - payment --- import { CodeTabs, CodeTab, Prerequisites } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx b/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx index 0fbb1b13a2..60d46ce77b 100644 --- a/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/shipping/page.mdx @@ -3,6 +3,9 @@ tags: - cart - storefront - fulfillment +products: + - cart + - fulfillment --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/addresses/page.mdx b/www/apps/resources/app/storefront-development/customers/addresses/page.mdx index 4e59aba7f1..f0570360e8 100644 --- a/www/apps/resources/app/storefront-development/customers/addresses/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/addresses/page.mdx @@ -2,6 +2,8 @@ tags: - customer - storefront +products: + - customer --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/context/page.mdx b/www/apps/resources/app/storefront-development/customers/context/page.mdx index fc93916263..46b51af93d 100644 --- a/www/apps/resources/app/storefront-development/customers/context/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/context/page.mdx @@ -2,6 +2,8 @@ tags: - customer - storefront +products: + - customer --- export const metadata = { diff --git a/www/apps/resources/app/storefront-development/customers/log-out/page.mdx b/www/apps/resources/app/storefront-development/customers/log-out/page.mdx index 2b0b7a2faa..d3b6e97fe2 100644 --- a/www/apps/resources/app/storefront-development/customers/log-out/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/log-out/page.mdx @@ -3,6 +3,9 @@ tags: - customer - storefront - auth +products: + - customer + - auth --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/login/page.mdx b/www/apps/resources/app/storefront-development/customers/login/page.mdx index 9a34e2be9a..3148413b3c 100644 --- a/www/apps/resources/app/storefront-development/customers/login/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/login/page.mdx @@ -3,6 +3,9 @@ tags: - customer - storefront - auth +products: + - customer + - auth --- import { CodeTabs, CodeTab, Table } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/page.mdx b/www/apps/resources/app/storefront-development/customers/page.mdx index 87d248065a..ec126cee66 100644 --- a/www/apps/resources/app/storefront-development/customers/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - customer +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/storefront-development/customers/profile/page.mdx b/www/apps/resources/app/storefront-development/customers/profile/page.mdx index e7ef143d98..0a38616510 100644 --- a/www/apps/resources/app/storefront-development/customers/profile/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/profile/page.mdx @@ -2,6 +2,8 @@ tags: - customer - storefront +products: + - customer --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/register/page.mdx b/www/apps/resources/app/storefront-development/customers/register/page.mdx index b0ea72d9bf..889433eb90 100644 --- a/www/apps/resources/app/storefront-development/customers/register/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/register/page.mdx @@ -3,6 +3,9 @@ tags: - customer - storefront - auth +products: + - customer + - auth --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/reset-password/page.mdx b/www/apps/resources/app/storefront-development/customers/reset-password/page.mdx index 278d267264..07db1f315b 100644 --- a/www/apps/resources/app/storefront-development/customers/reset-password/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/reset-password/page.mdx @@ -3,6 +3,9 @@ tags: - customer - storefront - auth +products: + - customer + - auth --- import { CodeTabs, CodeTab, Prerequisites } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx b/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx index 2701a11c1e..99def759c7 100644 --- a/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/retrieve/page.mdx @@ -3,6 +3,9 @@ tags: - customer - storefront - auth +products: + - customer + - auth --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx b/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx index 3aa6fa6bc0..d2ff310bb9 100644 --- a/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx +++ b/www/apps/resources/app/storefront-development/customers/third-party-login/page.mdx @@ -3,6 +3,9 @@ tags: - customer - storefront - auth +products: + - customer + - auth --- import { Prerequisites, CodeTabs, CodeTab, Details } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/guides/express-checkout/page.mdx b/www/apps/resources/app/storefront-development/guides/express-checkout/page.mdx index 8e5782fbd4..8c98d3235d 100644 --- a/www/apps/resources/app/storefront-development/guides/express-checkout/page.mdx +++ b/www/apps/resources/app/storefront-development/guides/express-checkout/page.mdx @@ -9,6 +9,14 @@ tags: - region - checkout - example +products: + - cart + - product + - payment + - fulfillment + - order + - region + - sales channel --- import { Card, Prerequisites, Details } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/categories/list/page.mdx b/www/apps/resources/app/storefront-development/products/categories/list/page.mdx index f5bae2e52e..91ba37357f 100644 --- a/www/apps/resources/app/storefront-development/products/categories/list/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/list/page.mdx @@ -3,6 +3,8 @@ tags: - product - product category - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx b/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx index de44457864..ebc63fe4d8 100644 --- a/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/nested-categories/page.mdx @@ -3,6 +3,8 @@ tags: - product - product category - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/categories/page.mdx b/www/apps/resources/app/storefront-development/products/categories/page.mdx index 979e9f9e2e..0b5bb660b2 100644 --- a/www/apps/resources/app/storefront-development/products/categories/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/storefront-development/products/categories/products/page.mdx b/www/apps/resources/app/storefront-development/products/categories/products/page.mdx index 4032f29c5c..a295f739ab 100644 --- a/www/apps/resources/app/storefront-development/products/categories/products/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/products/page.mdx @@ -3,6 +3,8 @@ tags: - product - product category - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx b/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx index 0a7d67fc80..487afe2f9a 100644 --- a/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/products/categories/retrieve/page.mdx @@ -3,6 +3,8 @@ tags: - product - product category - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/collections/list/page.mdx b/www/apps/resources/app/storefront-development/products/collections/list/page.mdx index 895ea058dd..70e69a872d 100644 --- a/www/apps/resources/app/storefront-development/products/collections/list/page.mdx +++ b/www/apps/resources/app/storefront-development/products/collections/list/page.mdx @@ -3,6 +3,8 @@ tags: - product - product collection - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/collections/page.mdx b/www/apps/resources/app/storefront-development/products/collections/page.mdx index 419b20128b..571648fd8b 100644 --- a/www/apps/resources/app/storefront-development/products/collections/page.mdx +++ b/www/apps/resources/app/storefront-development/products/collections/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/storefront-development/products/collections/products/page.mdx b/www/apps/resources/app/storefront-development/products/collections/products/page.mdx index 4f9e0d1826..595c45e0cb 100644 --- a/www/apps/resources/app/storefront-development/products/collections/products/page.mdx +++ b/www/apps/resources/app/storefront-development/products/collections/products/page.mdx @@ -3,6 +3,8 @@ tags: - product - product collection - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx b/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx index 029b8e569d..6764d434ee 100644 --- a/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/products/collections/retrieve/page.mdx @@ -3,6 +3,8 @@ tags: - product - product collection - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/inventory/page.mdx b/www/apps/resources/app/storefront-development/products/inventory/page.mdx index 5d4c994044..490a29cbb0 100644 --- a/www/apps/resources/app/storefront-development/products/inventory/page.mdx +++ b/www/apps/resources/app/storefront-development/products/inventory/page.mdx @@ -3,6 +3,9 @@ tags: - product - inventory - storefront +products: + - product + - inventory --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/list/page.mdx b/www/apps/resources/app/storefront-development/products/list/page.mdx index 5c731a9ea0..24cbeab2f7 100644 --- a/www/apps/resources/app/storefront-development/products/list/page.mdx +++ b/www/apps/resources/app/storefront-development/products/list/page.mdx @@ -2,6 +2,8 @@ tags: - product - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/page.mdx b/www/apps/resources/app/storefront-development/products/page.mdx index 98df999245..154f0d61b2 100644 --- a/www/apps/resources/app/storefront-development/products/page.mdx +++ b/www/apps/resources/app/storefront-development/products/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - product +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx b/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx index 21954f5389..74dacc8ac7 100644 --- a/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/examples/sale-price/page.mdx @@ -5,6 +5,9 @@ tags: - product - storefront - pricing +products: + - product + - pricing --- export const metadata = { diff --git a/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx b/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx index b200fdf84b..e0f5296d2a 100644 --- a/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/examples/show-price/page.mdx @@ -5,6 +5,9 @@ tags: - product - storefront - pricing +products: + - product + - pricing --- export const metadata = { diff --git a/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx b/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx index 33d3066247..12a54a40b0 100644 --- a/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/examples/tax-price/page.mdx @@ -6,6 +6,10 @@ tags: - storefront - pricing - tax +products: + - product + - pricing + - tax --- export const metadata = { diff --git a/www/apps/resources/app/storefront-development/products/price/page.mdx b/www/apps/resources/app/storefront-development/products/price/page.mdx index 06da618eac..736bcb99a4 100644 --- a/www/apps/resources/app/storefront-development/products/price/page.mdx +++ b/www/apps/resources/app/storefront-development/products/price/page.mdx @@ -3,6 +3,9 @@ tags: - product - storefront - pricing +products: + - product + - pricing --- import { CodeTabs, CodeTab, Table } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/retrieve/page.mdx b/www/apps/resources/app/storefront-development/products/retrieve/page.mdx index ffd3e1e749..afc7720bb2 100644 --- a/www/apps/resources/app/storefront-development/products/retrieve/page.mdx +++ b/www/apps/resources/app/storefront-development/products/retrieve/page.mdx @@ -2,6 +2,8 @@ tags: - product - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/products/variants/page.mdx b/www/apps/resources/app/storefront-development/products/variants/page.mdx index 0654fec3d1..d4e653baf7 100644 --- a/www/apps/resources/app/storefront-development/products/variants/page.mdx +++ b/www/apps/resources/app/storefront-development/products/variants/page.mdx @@ -2,6 +2,8 @@ tags: - product - storefront +products: + - product --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx b/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx index 7dfd738434..84114c553a 100644 --- a/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx +++ b/www/apps/resources/app/storefront-development/publishable-api-keys/page.mdx @@ -4,6 +4,9 @@ tags: - api key - storefront - sales channel +products: + - api key + - sales channel --- export const metadata = { diff --git a/www/apps/resources/app/storefront-development/regions/context/page.mdx b/www/apps/resources/app/storefront-development/regions/context/page.mdx index 0e3a7c5b66..0a068f6bcb 100644 --- a/www/apps/resources/app/storefront-development/regions/context/page.mdx +++ b/www/apps/resources/app/storefront-development/regions/context/page.mdx @@ -2,6 +2,8 @@ tags: - region - storefront +products: + - region --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/regions/list/page.mdx b/www/apps/resources/app/storefront-development/regions/list/page.mdx index 7a3e9e59a7..d921fd8d2d 100644 --- a/www/apps/resources/app/storefront-development/regions/list/page.mdx +++ b/www/apps/resources/app/storefront-development/regions/list/page.mdx @@ -2,6 +2,8 @@ tags: - region - storefront +products: + - region --- import { CodeTabs, CodeTab } from "docs-ui" diff --git a/www/apps/resources/app/storefront-development/regions/page.mdx b/www/apps/resources/app/storefront-development/regions/page.mdx index f18c51424d..3b0768f783 100644 --- a/www/apps/resources/app/storefront-development/regions/page.mdx +++ b/www/apps/resources/app/storefront-development/regions/page.mdx @@ -1,3 +1,8 @@ +--- +products: + - region +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx b/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx index 91fea2ec62..a6fc409442 100644 --- a/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx +++ b/www/apps/resources/app/storefront-development/regions/store-retrieve-region/page.mdx @@ -2,6 +2,8 @@ tags: - region - storefront +products: + - region --- export const metadata = { diff --git a/www/apps/resources/app/tools/page.mdx b/www/apps/resources/app/tools/page.mdx index 035836ad6e..c0dd97cd43 100644 --- a/www/apps/resources/app/tools/page.mdx +++ b/www/apps/resources/app/tools/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/app/troubleshooting/page.mdx b/www/apps/resources/app/troubleshooting/page.mdx index a738520817..53ab7bb2f1 100644 --- a/www/apps/resources/app/troubleshooting/page.mdx +++ b/www/apps/resources/app/troubleshooting/page.mdx @@ -1,3 +1,7 @@ +--- +generate_toc: true +--- + import { ChildDocs } from "docs-ui" export const metadata = { diff --git a/www/apps/resources/components/MDXComponents/index.tsx b/www/apps/resources/components/MDXComponents/index.tsx index 14119774da..8e4d9b55eb 100644 --- a/www/apps/resources/components/MDXComponents/index.tsx +++ b/www/apps/resources/components/MDXComponents/index.tsx @@ -12,6 +12,7 @@ import { Tooltip, CopyGeneratedSnippetButton, BadgesList, + InjectedMDXData, } from "docs-ui" import { CommerceModuleSections } from "../CommerceModuleSections" import { EventHeader } from "../EventHeader" @@ -33,6 +34,7 @@ const MDXComponents: MDXComponentsType = { EventHeader, CopyGeneratedSnippetButton, BadgesList, + InjectedMDXData, } export default MDXComponents diff --git a/www/apps/resources/config/index.ts b/www/apps/resources/config/index.ts index 0ca56bfa90..90a0d7a296 100644 --- a/www/apps/resources/config/index.ts +++ b/www/apps/resources/config/index.ts @@ -1,5 +1,6 @@ import { DocsConfig } from "types" import { globalConfig } from "docs-ui" +import { basePathUrl } from "../utils/base-path-url" const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000" @@ -22,4 +23,11 @@ export const config: DocsConfig = { ], }, logo: `${process.env.NEXT_PUBLIC_BASE_PATH}/images/logo.png`, + version: { + ...globalConfig.version, + bannerImage: { + light: basePathUrl("/images/get-started-card.png"), + dark: basePathUrl("/images/get-started-card-dark.png"), + }, + }, } diff --git a/www/apps/resources/mdx-options.mjs b/www/apps/resources/mdx-options.mjs index 1a342282e6..3a20308872 100644 --- a/www/apps/resources/mdx-options.mjs +++ b/www/apps/resources/mdx-options.mjs @@ -4,9 +4,11 @@ import { cloudinaryImgRehypePlugin, resolveAdmonitionsPlugin, crossProjectLinksPlugin, + remarkAttachFrontmatterDataPlugin, } from "remark-rehype-plugins" import remarkFrontmatter from "remark-frontmatter" import remarkDirective from "remark-directive" +import withExtractedTableOfContents from "@stefanprobst/rehype-extract-toc" /** @type {import("@next/mdx").NextMDXOptions} */ const mdxPluginOptions = { @@ -57,9 +59,11 @@ const mdxPluginOptions = { }, }, ], + [withExtractedTableOfContents], ], remarkPlugins: [ [remarkFrontmatter], + [remarkAttachFrontmatterDataPlugin], [remarkDirective], [resolveAdmonitionsPlugin], ], diff --git a/www/apps/resources/next.config.mjs b/www/apps/resources/next.config.mjs index 7fa0ffd540..f6d2e1fe5a 100644 --- a/www/apps/resources/next.config.mjs +++ b/www/apps/resources/next.config.mjs @@ -2,6 +2,7 @@ import { brokenLinkCheckerPlugin, localLinksRehypePlugin, prerequisitesLinkFixerPlugin, + recmaInjectMdxDataPlugin, typeListLinkFixerPlugin, workflowDiagramLinkFixerPlugin, } from "remark-rehype-plugins" @@ -61,6 +62,7 @@ const withMDX = mdx({ ], ], remarkPlugins: mdxPluginOptions.options.remarkPlugins, + recmaPlugins: [[recmaInjectMdxDataPlugin]], jsx: true, }, }) diff --git a/www/apps/resources/package.json b/www/apps/resources/package.json index e8545954ff..447e1da72e 100644 --- a/www/apps/resources/package.json +++ b/www/apps/resources/package.json @@ -18,6 +18,7 @@ "@mdx-js/react": "^3.1.0", "@medusajs/icons": "2.8.3", "@next/mdx": "15.3.1", + "@stefanprobst/rehype-extract-toc": "^3.0.0", "clsx": "^2.1.0", "docs-ui": "*", "next": "15.3.1", diff --git a/www/apps/resources/public/images/api-key-icon.png b/www/apps/resources/public/images/api-key-icon.png new file mode 100644 index 0000000000..88d8166f9f Binary files /dev/null and b/www/apps/resources/public/images/api-key-icon.png differ diff --git a/www/apps/resources/public/images/auth-icon.png b/www/apps/resources/public/images/auth-icon.png new file mode 100644 index 0000000000..c3afa03d74 Binary files /dev/null and b/www/apps/resources/public/images/auth-icon.png differ diff --git a/www/apps/resources/public/images/cart-icon.png b/www/apps/resources/public/images/cart-icon.png new file mode 100644 index 0000000000..75a37f623d Binary files /dev/null and b/www/apps/resources/public/images/cart-icon.png differ diff --git a/www/apps/resources/public/images/currency-icon.png b/www/apps/resources/public/images/currency-icon.png new file mode 100644 index 0000000000..fef1c2f7e2 Binary files /dev/null and b/www/apps/resources/public/images/currency-icon.png differ diff --git a/www/apps/resources/public/images/customer-icon.png b/www/apps/resources/public/images/customer-icon.png new file mode 100644 index 0000000000..b1deb68afc Binary files /dev/null and b/www/apps/resources/public/images/customer-icon.png differ diff --git a/www/apps/resources/public/images/fulfillment-icon.png b/www/apps/resources/public/images/fulfillment-icon.png new file mode 100644 index 0000000000..efbf148a01 Binary files /dev/null and b/www/apps/resources/public/images/fulfillment-icon.png differ diff --git a/www/apps/resources/public/images/get-started-card-dark.png b/www/apps/resources/public/images/get-started-card-dark.png new file mode 100644 index 0000000000..cf78ad0c31 Binary files /dev/null and b/www/apps/resources/public/images/get-started-card-dark.png differ diff --git a/www/apps/resources/public/images/get-started-card.png b/www/apps/resources/public/images/get-started-card.png new file mode 100644 index 0000000000..5b05ed9b27 Binary files /dev/null and b/www/apps/resources/public/images/get-started-card.png differ diff --git a/www/apps/resources/public/images/inventory-icon.png b/www/apps/resources/public/images/inventory-icon.png new file mode 100644 index 0000000000..7632438bac Binary files /dev/null and b/www/apps/resources/public/images/inventory-icon.png differ diff --git a/www/apps/resources/public/images/order-icon.png b/www/apps/resources/public/images/order-icon.png new file mode 100644 index 0000000000..8869a30ec8 Binary files /dev/null and b/www/apps/resources/public/images/order-icon.png differ diff --git a/www/apps/resources/public/images/payment-icon.png b/www/apps/resources/public/images/payment-icon.png new file mode 100644 index 0000000000..124d62965d Binary files /dev/null and b/www/apps/resources/public/images/payment-icon.png differ diff --git a/www/apps/resources/public/images/pricing-icon.png b/www/apps/resources/public/images/pricing-icon.png new file mode 100644 index 0000000000..ae0e8ad462 Binary files /dev/null and b/www/apps/resources/public/images/pricing-icon.png differ diff --git a/www/apps/resources/public/images/product-icon.png b/www/apps/resources/public/images/product-icon.png new file mode 100644 index 0000000000..8fdb4f0d0c Binary files /dev/null and b/www/apps/resources/public/images/product-icon.png differ diff --git a/www/apps/resources/public/images/promotion-icon.png b/www/apps/resources/public/images/promotion-icon.png new file mode 100644 index 0000000000..640200620b Binary files /dev/null and b/www/apps/resources/public/images/promotion-icon.png differ diff --git a/www/apps/resources/public/images/region-icon.png b/www/apps/resources/public/images/region-icon.png new file mode 100644 index 0000000000..72fb2b63e6 Binary files /dev/null and b/www/apps/resources/public/images/region-icon.png differ diff --git a/www/apps/resources/public/images/sales-channel-icon.png b/www/apps/resources/public/images/sales-channel-icon.png new file mode 100644 index 0000000000..47867c1508 Binary files /dev/null and b/www/apps/resources/public/images/sales-channel-icon.png differ diff --git a/www/apps/resources/public/images/stock-location-icon.png b/www/apps/resources/public/images/stock-location-icon.png new file mode 100644 index 0000000000..61674b2f5b Binary files /dev/null and b/www/apps/resources/public/images/stock-location-icon.png differ diff --git a/www/apps/resources/public/images/tax-icon.png b/www/apps/resources/public/images/tax-icon.png new file mode 100644 index 0000000000..2be16099b4 Binary files /dev/null and b/www/apps/resources/public/images/tax-icon.png differ diff --git a/www/apps/resources/public/images/user-icon.png b/www/apps/resources/public/images/user-icon.png new file mode 100644 index 0000000000..bff05107f0 Binary files /dev/null and b/www/apps/resources/public/images/user-icon.png differ diff --git a/www/apps/resources/references/module_events/module_events.Auth/page.mdx b/www/apps/resources/references/module_events/module_events.Auth/page.mdx index 69a0796035..fc62b692c1 100644 --- a/www/apps/resources/references/module_events/module_events.Auth/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Auth/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/auth/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.Cart/page.mdx b/www/apps/resources/references/module_events/module_events.Cart/page.mdx index 4628cce06f..2ed39ce67e 100644 --- a/www/apps/resources/references/module_events/module_events.Cart/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Cart/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/cart/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.Customer/page.mdx b/www/apps/resources/references/module_events/module_events.Customer/page.mdx index 937eb4c53f..1a737270a6 100644 --- a/www/apps/resources/references/module_events/module_events.Customer/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Customer/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/customer/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.Fulfillment/page.mdx b/www/apps/resources/references/module_events/module_events.Fulfillment/page.mdx index c5fdcd78d0..6221b40051 100644 --- a/www/apps/resources/references/module_events/module_events.Fulfillment/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Fulfillment/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/fulfillment/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.Order/page.mdx b/www/apps/resources/references/module_events/module_events.Order/page.mdx index 2fb1e25028..e03851f216 100644 --- a/www/apps/resources/references/module_events/module_events.Order/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Order/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/order/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.Product/page.mdx b/www/apps/resources/references/module_events/module_events.Product/page.mdx index b30ceb7a89..51b07c89b5 100644 --- a/www/apps/resources/references/module_events/module_events.Product/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Product/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/product/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.Region/page.mdx b/www/apps/resources/references/module_events/module_events.Region/page.mdx index 6f8611e1c6..10cb8ee952 100644 --- a/www/apps/resources/references/module_events/module_events.Region/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Region/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/region/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.Sales_Channel/page.mdx b/www/apps/resources/references/module_events/module_events.Sales_Channel/page.mdx index ccb742ea4b..3e0d78f746 100644 --- a/www/apps/resources/references/module_events/module_events.Sales_Channel/page.mdx +++ b/www/apps/resources/references/module_events/module_events.Sales_Channel/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/sales-channel/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/module_events/module_events.User/page.mdx b/www/apps/resources/references/module_events/module_events.User/page.mdx index 20fc794b1f..cca6ae8afc 100644 --- a/www/apps/resources/references/module_events/module_events.User/page.mdx +++ b/www/apps/resources/references/module_events/module_events.User/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/user/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/resources/references/modules/events/page.mdx b/www/apps/resources/references/modules/events/page.mdx index 4eb11fd303..2853e69025 100644 --- a/www/apps/resources/references/modules/events/page.mdx +++ b/www/apps/resources/references/modules/events/page.mdx @@ -1,6 +1,7 @@ --- slug: /references/events sidebar_label: Events Reference +generate_toc: true --- import { TypeList } from "docs-ui" diff --git a/www/apps/ui/src/app/layout.tsx b/www/apps/ui/src/app/layout.tsx index 7ae82b31f7..1573687925 100644 --- a/www/apps/ui/src/app/layout.tsx +++ b/www/apps/ui/src/app/layout.tsx @@ -4,7 +4,7 @@ import { Providers } from "@/providers" import { siteConfig } from "@/config/site" import "../styles/globals.css" -import { BareboneLayout, TightLayout } from "docs-ui" +import { BareboneLayout, InjectedMDXData, TightLayout } from "docs-ui" import { Inter, Roboto_Mono } from "next/font/google" import clsx from "clsx" @@ -60,7 +60,19 @@ export default function RootLayout({ htmlClassName={clsx(inter.variable, robotoMono.variable)} gaId={process.env.NEXT_PUBLIC_GA_ID} > - {children} + + {children} + {/* + Since we use contentlayer in this project, we can't use a Recma plugin. + This is a workaround until we move from contentlayer. + */} + + ) } diff --git a/www/apps/ui/src/app/not-found.mdx b/www/apps/ui/src/app/not-found.mdx index 85074422ce..c0b1caa0c4 100644 --- a/www/apps/ui/src/app/not-found.mdx +++ b/www/apps/ui/src/app/not-found.mdx @@ -10,7 +10,7 @@ export const metadata = { title: `Page Not Found`, } -

{metadata.title}

+# {metadata.title} The page you were looking for isn't available. diff --git a/www/apps/ui/src/app/not-found.tsx b/www/apps/ui/src/app/not-found.tsx index 380f396ddc..5fae8d22a9 100644 --- a/www/apps/ui/src/app/not-found.tsx +++ b/www/apps/ui/src/app/not-found.tsx @@ -20,7 +20,7 @@ export default function NotFound() { return (
{/* @ts-expect-error React v19 doesn't recognize these as elements. */} -

Page Not Found

+

Page Not Found

{/* @ts-expect-error React v19 doesn't recognize these as elements. */}

The page you were looking for isn't available.

{/* @ts-expect-error React v19 doesn't recognize these as elements. */} diff --git a/www/apps/user-guide/app/customers/groups/page.mdx b/www/apps/user-guide/app/customers/groups/page.mdx index 732d06d167..07bfdfdc19 100644 --- a/www/apps/user-guide/app/customers/groups/page.mdx +++ b/www/apps/user-guide/app/customers/groups/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Customer Groups" tags: - user guide - customer +products: + - customer --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/customers/manage/page.mdx b/www/apps/user-guide/app/customers/manage/page.mdx index 93fdef76c4..f8e8f92a3d 100644 --- a/www/apps/user-guide/app/customers/manage/page.mdx +++ b/www/apps/user-guide/app/customers/manage/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Customers" tags: - user guide - customer +products: + - customer --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/customers/page.mdx b/www/apps/user-guide/app/customers/page.mdx index 2049ec9a91..66afb4d1b2 100644 --- a/www/apps/user-guide/app/customers/page.mdx +++ b/www/apps/user-guide/app/customers/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Customers Overview" tags: - user guide - customer +products: + - customer --- export const metadata = { diff --git a/www/apps/user-guide/app/inventory/inventory/page.mdx b/www/apps/user-guide/app/inventory/inventory/page.mdx index 312cc9ef62..c07a46e5c5 100644 --- a/www/apps/user-guide/app/inventory/inventory/page.mdx +++ b/www/apps/user-guide/app/inventory/inventory/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Inventory Items" tags: - user guide - inventory +products: + - inventory --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/inventory/page.mdx b/www/apps/user-guide/app/inventory/page.mdx index 6eaf73f6d8..2c3c4977c0 100644 --- a/www/apps/user-guide/app/inventory/page.mdx +++ b/www/apps/user-guide/app/inventory/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Inventory Overview" tags: - user guide - inventory +products: + - inventory --- export const metadata = { diff --git a/www/apps/user-guide/app/inventory/reservations/page.mdx b/www/apps/user-guide/app/inventory/reservations/page.mdx index 20b7fc7dff..05876cbe65 100644 --- a/www/apps/user-guide/app/inventory/reservations/page.mdx +++ b/www/apps/user-guide/app/inventory/reservations/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Reservations" tags: - user guide - inventory +products: + - inventory --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/not-found.mdx b/www/apps/user-guide/app/not-found.mdx index 85074422ce..277170c593 100644 --- a/www/apps/user-guide/app/not-found.mdx +++ b/www/apps/user-guide/app/not-found.mdx @@ -1,3 +1,7 @@ +--- +hide_content_menu: true +--- + import { CardList, H1 } from "docs-ui" import { BookOpen, @@ -10,7 +14,7 @@ export const metadata = { title: `Page Not Found`, } -

{metadata.title}

+# {metadata.title} The page you were looking for isn't available. diff --git a/www/apps/user-guide/app/orders/claims/page.mdx b/www/apps/user-guide/app/orders/claims/page.mdx index 05560bddaa..0ee9dfdf10 100644 --- a/www/apps/user-guide/app/orders/claims/page.mdx +++ b/www/apps/user-guide/app/orders/claims/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Order Claims" tags: - user guide - order +products: + - order --- import { diff --git a/www/apps/user-guide/app/orders/edit/page.mdx b/www/apps/user-guide/app/orders/edit/page.mdx index 0426fa01a7..096e13dc45 100644 --- a/www/apps/user-guide/app/orders/edit/page.mdx +++ b/www/apps/user-guide/app/orders/edit/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Edit Order Items" tags: - user guide - order +products: + - order --- import { diff --git a/www/apps/user-guide/app/orders/exchanges/page.mdx b/www/apps/user-guide/app/orders/exchanges/page.mdx index c8669200fc..c931a99de5 100644 --- a/www/apps/user-guide/app/orders/exchanges/page.mdx +++ b/www/apps/user-guide/app/orders/exchanges/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Order Exchanges" tags: - user guide - order +products: + - order --- import { diff --git a/www/apps/user-guide/app/orders/fulfillments/page.mdx b/www/apps/user-guide/app/orders/fulfillments/page.mdx index 1dfc932876..159d8e322f 100644 --- a/www/apps/user-guide/app/orders/fulfillments/page.mdx +++ b/www/apps/user-guide/app/orders/fulfillments/page.mdx @@ -5,6 +5,9 @@ tags: - user guide - order - fulfillment +products: + - order + - fulfillment --- import { diff --git a/www/apps/user-guide/app/orders/manage/page.mdx b/www/apps/user-guide/app/orders/manage/page.mdx index 1107981dcc..31c9945037 100644 --- a/www/apps/user-guide/app/orders/manage/page.mdx +++ b/www/apps/user-guide/app/orders/manage/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Order Details" tags: - user guide - order +products: + - order --- import { diff --git a/www/apps/user-guide/app/orders/page.mdx b/www/apps/user-guide/app/orders/page.mdx index 3e3a0c7f74..0b80abd902 100644 --- a/www/apps/user-guide/app/orders/page.mdx +++ b/www/apps/user-guide/app/orders/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Orders Overview" tags: - user guide - order +products: + - order --- export const metadata = { diff --git a/www/apps/user-guide/app/orders/payments/page.mdx b/www/apps/user-guide/app/orders/payments/page.mdx index 6bf1efecac..2054f5c899 100644 --- a/www/apps/user-guide/app/orders/payments/page.mdx +++ b/www/apps/user-guide/app/orders/payments/page.mdx @@ -5,6 +5,9 @@ tags: - user guide - order - payment +products: + - order + - payment --- import { diff --git a/www/apps/user-guide/app/orders/returns/page.mdx b/www/apps/user-guide/app/orders/returns/page.mdx index 3a590f5066..ed815a5208 100644 --- a/www/apps/user-guide/app/orders/returns/page.mdx +++ b/www/apps/user-guide/app/orders/returns/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Order Returns" tags: - user guide - order +products: + - order --- import { diff --git a/www/apps/user-guide/app/price-lists/create/page.mdx b/www/apps/user-guide/app/price-lists/create/page.mdx index 0de1e58fe2..6efebb34b0 100644 --- a/www/apps/user-guide/app/price-lists/create/page.mdx +++ b/www/apps/user-guide/app/price-lists/create/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Create a Price List" tags: - user guide - pricing +products: + - pricing --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/price-lists/manage/page.mdx b/www/apps/user-guide/app/price-lists/manage/page.mdx index 7f9f3c224a..9150aca65d 100644 --- a/www/apps/user-guide/app/price-lists/manage/page.mdx +++ b/www/apps/user-guide/app/price-lists/manage/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Price Lists" tags: - user guide - pricing +products: + - pricing --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/price-lists/page.mdx b/www/apps/user-guide/app/price-lists/page.mdx index bd81b52c68..b075c2482b 100644 --- a/www/apps/user-guide/app/price-lists/page.mdx +++ b/www/apps/user-guide/app/price-lists/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Price Lists Overview" tags: - user guide - pricing +products: + - pricing --- export const metadata = { diff --git a/www/apps/user-guide/app/products/categories/page.mdx b/www/apps/user-guide/app/products/categories/page.mdx index a325c509ce..2d3bdd921a 100644 --- a/www/apps/user-guide/app/products/categories/page.mdx +++ b/www/apps/user-guide/app/products/categories/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Product Categories" tags: - user guide - product +products: + - product --- import { DotsSix, TriangleRightMini, EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/products/collections/page.mdx b/www/apps/user-guide/app/products/collections/page.mdx index b31a3b382b..7c4270dd95 100644 --- a/www/apps/user-guide/app/products/collections/page.mdx +++ b/www/apps/user-guide/app/products/collections/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Product Collections" tags: - user guide - product +products: + - product --- import { EllipsisHorizontal,ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/products/create/bundle/page.mdx b/www/apps/user-guide/app/products/create/bundle/page.mdx index 28bdb1f4f4..5e176478db 100644 --- a/www/apps/user-guide/app/products/create/bundle/page.mdx +++ b/www/apps/user-guide/app/products/create/bundle/page.mdx @@ -3,6 +3,9 @@ sidebar_label: "Create Bundle Product" tags: - user guide - product +products: + - product + - inventory --- export const metadata = { diff --git a/www/apps/user-guide/app/products/create/multi-part/page.mdx b/www/apps/user-guide/app/products/create/multi-part/page.mdx index 6e24b7d34f..2f97a81f79 100644 --- a/www/apps/user-guide/app/products/create/multi-part/page.mdx +++ b/www/apps/user-guide/app/products/create/multi-part/page.mdx @@ -3,6 +3,9 @@ sidebar_label: "Create Multi-Part Product" tags: - user guide - product +products: + - product + - inventory --- export const metadata = { diff --git a/www/apps/user-guide/app/products/create/page.mdx b/www/apps/user-guide/app/products/create/page.mdx index 5f8f18e8a6..9f0eb02863 100644 --- a/www/apps/user-guide/app/products/create/page.mdx +++ b/www/apps/user-guide/app/products/create/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Create Product" tags: - user guide - product +products: + - product --- import { DotsSix, EllipsisHorizontal, XMark, TaxExclusive, TaxInclusive } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/products/edit/page.mdx b/www/apps/user-guide/app/products/edit/page.mdx index 0bc4f898b9..27a890d7ac 100644 --- a/www/apps/user-guide/app/products/edit/page.mdx +++ b/www/apps/user-guide/app/products/edit/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Edit Product" tags: - user guide - product +products: + - product --- import { ArrowUpRightOnBox, EllipsisHorizontal, EllipsisVertical, ThumbnailBadge } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/products/export/page.mdx b/www/apps/user-guide/app/products/export/page.mdx index 5af9901d58..986431eb9d 100644 --- a/www/apps/user-guide/app/products/export/page.mdx +++ b/www/apps/user-guide/app/products/export/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Export Products" tags: - user guide - product +products: + - product --- import { BellAlert, ArrowDownTray } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/products/import/page.mdx b/www/apps/user-guide/app/products/import/page.mdx index 459659fe99..4286d8c89d 100644 --- a/www/apps/user-guide/app/products/import/page.mdx +++ b/www/apps/user-guide/app/products/import/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Import Products" tags: - user guide - product +products: + - product --- import { ArrowDownTray, Trash, BellAlert, EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/products/page.mdx b/www/apps/user-guide/app/products/page.mdx index 0a548793ed..dc720f48d6 100644 --- a/www/apps/user-guide/app/products/page.mdx +++ b/www/apps/user-guide/app/products/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Products Overview" tags: - user guide - product +products: + - product --- export const metadata = { diff --git a/www/apps/user-guide/app/products/variants/page.mdx b/www/apps/user-guide/app/products/variants/page.mdx index b3a7faf557..36e76e8a10 100644 --- a/www/apps/user-guide/app/products/variants/page.mdx +++ b/www/apps/user-guide/app/products/variants/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Product Variants" tags: - user guide - product +products: + - product --- import { EllipsisVertical, TaxExclusive, TaxInclusive, ArrowUpRightOnBox } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/promotions/campaigns/page.mdx b/www/apps/user-guide/app/promotions/campaigns/page.mdx index af0446ab1d..c3327a7601 100644 --- a/www/apps/user-guide/app/promotions/campaigns/page.mdx +++ b/www/apps/user-guide/app/promotions/campaigns/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Manage Campaigns" tags: - user guide - promotion +products: + - promotion --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/promotions/create/page.mdx b/www/apps/user-guide/app/promotions/create/page.mdx index 852c9616ce..b2a67a5934 100644 --- a/www/apps/user-guide/app/promotions/create/page.mdx +++ b/www/apps/user-guide/app/promotions/create/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Create a Promotion" tags: - user guide - promotion +products: + - promotion --- export const metadata = { diff --git a/www/apps/user-guide/app/promotions/manage/page.mdx b/www/apps/user-guide/app/promotions/manage/page.mdx index f58b97eaf0..8456e9d045 100644 --- a/www/apps/user-guide/app/promotions/manage/page.mdx +++ b/www/apps/user-guide/app/promotions/manage/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Promotions" tags: - user guide - promotion +products: + - promotion --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/promotions/page.mdx b/www/apps/user-guide/app/promotions/page.mdx index f64518e6ec..127ca4f1f3 100644 --- a/www/apps/user-guide/app/promotions/page.mdx +++ b/www/apps/user-guide/app/promotions/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Promotions Overview" tags: - user guide - promotion +products: + - promotion --- export const metadata = { diff --git a/www/apps/user-guide/app/reset-password/page.mdx b/www/apps/user-guide/app/reset-password/page.mdx index 76c06dc57e..ef098b3724 100644 --- a/www/apps/user-guide/app/reset-password/page.mdx +++ b/www/apps/user-guide/app/reset-password/page.mdx @@ -4,6 +4,9 @@ tags: - user guide - user - auth +products: + - user + - auth --- export const metadata = { diff --git a/www/apps/user-guide/app/settings/developer/publishable-api-keys/page.mdx b/www/apps/user-guide/app/settings/developer/publishable-api-keys/page.mdx index fd57570ef7..da4ed65de8 100644 --- a/www/apps/user-guide/app/settings/developer/publishable-api-keys/page.mdx +++ b/www/apps/user-guide/app/settings/developer/publishable-api-keys/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Manage Publishable API Keys" tags: - user guide - api key +products: + - api key --- import { Table } from "docs-ui" diff --git a/www/apps/user-guide/app/settings/developer/secret-api-keys/page.mdx b/www/apps/user-guide/app/settings/developer/secret-api-keys/page.mdx index 409dd51887..616d018e80 100644 --- a/www/apps/user-guide/app/settings/developer/secret-api-keys/page.mdx +++ b/www/apps/user-guide/app/settings/developer/secret-api-keys/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Manage Secret API Keys" tags: - user guide - api key +products: + - api key --- import { Table } from "docs-ui" diff --git a/www/apps/user-guide/app/settings/locations-and-shipping/locations/page.mdx b/www/apps/user-guide/app/settings/locations-and-shipping/locations/page.mdx index 32b43a2aaf..d3d6d2163f 100644 --- a/www/apps/user-guide/app/settings/locations-and-shipping/locations/page.mdx +++ b/www/apps/user-guide/app/settings/locations-and-shipping/locations/page.mdx @@ -7,6 +7,9 @@ tags: label: "Manage Locations" - name: fulfillment label: "Manage Shipping Options" +products: + - stock location + - fulfillment --- import { EllipsisHorizontal, TaxExclusive, TaxInclusive, ArrowsPointingOut, Plus } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/locations-and-shipping/page.mdx b/www/apps/user-guide/app/settings/locations-and-shipping/page.mdx index d4a506f789..78dcb26dc8 100644 --- a/www/apps/user-guide/app/settings/locations-and-shipping/page.mdx +++ b/www/apps/user-guide/app/settings/locations-and-shipping/page.mdx @@ -4,6 +4,9 @@ tags: - user guide - stock location - fulfillment +products: + - stock location + - fulfillment --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/locations-and-shipping/shipping-profiles/page.mdx b/www/apps/user-guide/app/settings/locations-and-shipping/shipping-profiles/page.mdx index c3c555f851..1394c9ad4e 100644 --- a/www/apps/user-guide/app/settings/locations-and-shipping/shipping-profiles/page.mdx +++ b/www/apps/user-guide/app/settings/locations-and-shipping/shipping-profiles/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Manage Shipping Profiles" tags: - user guide - fulfillment +products: + - fulfillment --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/product-tags/page.mdx b/www/apps/user-guide/app/settings/product-tags/page.mdx index 704ed2b9f2..d64503571d 100644 --- a/www/apps/user-guide/app/settings/product-tags/page.mdx +++ b/www/apps/user-guide/app/settings/product-tags/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Manage Product Tags" tags: - user guide - product +products: + - product --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/product-types/page.mdx b/www/apps/user-guide/app/settings/product-types/page.mdx index 8e792bddfa..64254f1f4e 100644 --- a/www/apps/user-guide/app/settings/product-types/page.mdx +++ b/www/apps/user-guide/app/settings/product-types/page.mdx @@ -3,6 +3,8 @@ sidebar_label: "Manage Product Types" tags: - user guide - product +products: + - product --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/profile/page.mdx b/www/apps/user-guide/app/settings/profile/page.mdx index 62df186fc1..7bb8f320a6 100644 --- a/www/apps/user-guide/app/settings/profile/page.mdx +++ b/www/apps/user-guide/app/settings/profile/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Profile" tags: - user guide - user +products: + - user --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/regions/page.mdx b/www/apps/user-guide/app/settings/regions/page.mdx index b33aac46c3..d623cc354a 100644 --- a/www/apps/user-guide/app/settings/regions/page.mdx +++ b/www/apps/user-guide/app/settings/regions/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Regions" tags: - user guide - region +products: + - region --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/return-reasons/page.mdx b/www/apps/user-guide/app/settings/return-reasons/page.mdx index b799490335..d142a8b1f7 100644 --- a/www/apps/user-guide/app/settings/return-reasons/page.mdx +++ b/www/apps/user-guide/app/settings/return-reasons/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Return Reasons" tags: - user guide - order +products: + - order --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/sales-channels/page.mdx b/www/apps/user-guide/app/settings/sales-channels/page.mdx index 5d71a515bd..f9a52a8b67 100644 --- a/www/apps/user-guide/app/settings/sales-channels/page.mdx +++ b/www/apps/user-guide/app/settings/sales-channels/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Sales Channels" tags: - user guide - sales channel +products: + - sales channel --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/store/page.mdx b/www/apps/user-guide/app/settings/store/page.mdx index e2e7e2a91f..ffd9108715 100644 --- a/www/apps/user-guide/app/settings/store/page.mdx +++ b/www/apps/user-guide/app/settings/store/page.mdx @@ -5,6 +5,8 @@ tags: - user guide - store - currency +products: + - currency --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/tax-regions/page.mdx b/www/apps/user-guide/app/settings/tax-regions/page.mdx index f354058ca1..ba0d4ff40b 100644 --- a/www/apps/user-guide/app/settings/tax-regions/page.mdx +++ b/www/apps/user-guide/app/settings/tax-regions/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Tax Regions" tags: - user guide - tax +products: + - tax --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/users/invites/page.mdx b/www/apps/user-guide/app/settings/users/invites/page.mdx index 068418617b..79aff377f1 100644 --- a/www/apps/user-guide/app/settings/users/invites/page.mdx +++ b/www/apps/user-guide/app/settings/users/invites/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Invites" tags: - user guide - user +products: + - user --- import { EllipsisHorizontal } from "@medusajs/icons" diff --git a/www/apps/user-guide/app/settings/users/page.mdx b/www/apps/user-guide/app/settings/users/page.mdx index 3b59bf5444..29291365cf 100644 --- a/www/apps/user-guide/app/settings/users/page.mdx +++ b/www/apps/user-guide/app/settings/users/page.mdx @@ -4,6 +4,8 @@ sidebar_label: "Manage Users" tags: - user guide - user +products: + - user --- import { EllipsisHorizontal, ArrowUpRightOnBox, EllipsisVertical } from "@medusajs/icons" diff --git a/www/apps/user-guide/config/index.ts b/www/apps/user-guide/config/index.ts index c32774ef83..0b73754f5c 100644 --- a/www/apps/user-guide/config/index.ts +++ b/www/apps/user-guide/config/index.ts @@ -1,6 +1,7 @@ import { DocsConfig, Sidebar } from "types" import { generatedSidebars } from "@/generated/sidebar.mjs" import { globalConfig } from "docs-ui" +import { basePathUrl } from "../utils/base-path-url" const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000" @@ -23,4 +24,11 @@ export const config: DocsConfig = { }, ], }, + version: { + ...globalConfig.version, + bannerImage: { + light: basePathUrl("/images/get-started-card.png"), + dark: basePathUrl("/images/get-started-card-dark.png"), + }, + }, } diff --git a/www/apps/user-guide/generated/edit-dates.mjs b/www/apps/user-guide/generated/edit-dates.mjs index 9003863d43..750cbdc9a0 100644 --- a/www/apps/user-guide/generated/edit-dates.mjs +++ b/www/apps/user-guide/generated/edit-dates.mjs @@ -2,58 +2,58 @@ export const generatedEditDates = { "app/tips/languages/page.mdx": "2025-04-11T09:14:21.012Z", "app/tips/bulk-editor/page.mdx": "2025-04-07T13:20:09.040Z", "app/tips/lists/page.mdx": "2025-02-14T14:16:04.867Z", - "app/settings/sales-channels/page.mdx": "2025-02-19T17:33:55.584Z", - "app/settings/users/page.mdx": "2025-02-19T11:34:00.736Z", + "app/settings/sales-channels/page.mdx": "2025-05-30T13:31:09.754Z", + "app/settings/users/page.mdx": "2025-05-30T13:31:29.991Z", "app/page.mdx": "2025-02-26T14:18:27.755Z", "app/settings/page.mdx": "2025-02-19T15:46:09.018Z", - "app/products/export/page.mdx": "2025-02-18T12:16:52.639Z", - "app/settings/return-reasons/page.mdx": "2025-02-19T17:34:01.942Z", - "app/settings/regions/page.mdx": "2025-02-19T17:37:17.896Z", - "app/orders/page.mdx": "2025-02-17T15:13:42.484Z", - "app/settings/users/invites/page.mdx": "2025-02-19T11:38:54.009Z", + "app/products/export/page.mdx": "2025-05-30T13:29:35.117Z", + "app/settings/return-reasons/page.mdx": "2025-05-30T13:31:05.596Z", + "app/settings/regions/page.mdx": "2025-05-30T13:30:59.228Z", + "app/orders/page.mdx": "2025-05-30T13:28:32.793Z", + "app/settings/users/invites/page.mdx": "2025-05-30T13:31:25.855Z", "app/settings/developer/page.mdx": "2025-02-25T15:11:55.392Z", - "app/settings/profile/page.mdx": "2025-03-06T08:49:28.814Z", - "app/settings/store/page.mdx": "2025-02-26T10:33:07.346Z", - "app/products/import/page.mdx": "2025-05-06T16:14:03.721Z", - "app/products/categories/page.mdx": "2025-02-19T10:21:42.058Z", - "app/inventory/reservations/page.mdx": "2025-02-18T13:56:28.134Z", + "app/settings/profile/page.mdx": "2025-05-30T13:30:55.079Z", + "app/settings/store/page.mdx": "2025-05-30T13:31:17.095Z", + "app/products/import/page.mdx": "2025-05-30T13:29:40.194Z", + "app/products/categories/page.mdx": "2025-05-30T13:28:59.821Z", + "app/inventory/reservations/page.mdx": "2025-05-30T13:27:25.559Z", "app/discounts/manage/page.mdx": "2024-05-03T17:36:38+03:00", - "app/products/page.mdx": "2025-02-18T12:24:19.794Z", - "app/inventory/inventory/page.mdx": "2025-02-18T13:59:16.960Z", - "app/customers/groups/page.mdx": "2025-02-18T15:41:30.730Z", - "app/orders/manage/page.mdx": "2025-02-18T15:38:17.544Z", - "app/orders/returns/page.mdx": "2025-02-17T15:10:11.039Z", - "app/inventory/page.mdx": "2025-02-18T13:58:42.393Z", - "app/orders/claims/page.mdx": "2025-02-17T15:16:27.380Z", - "app/orders/fulfillments/page.mdx": "2025-02-25T15:02:02.160Z", - "app/customers/page.mdx": "2025-02-18T15:38:17.543Z", - "app/orders/edit/page.mdx": "2025-02-17T15:15:53.489Z", - "app/products/collections/page.mdx": "2025-02-18T14:00:51.469Z", - "app/customers/manage/page.mdx": "2025-04-11T09:30:20.738Z", + "app/products/page.mdx": "2025-05-30T13:29:49.292Z", + "app/inventory/inventory/page.mdx": "2025-05-30T13:27:17.017Z", + "app/customers/groups/page.mdx": "2025-05-30T13:26:56.820Z", + "app/orders/manage/page.mdx": "2025-05-30T13:28:15.271Z", + "app/orders/returns/page.mdx": "2025-05-30T13:28:28.116Z", + "app/inventory/page.mdx": "2025-05-30T13:27:31.179Z", + "app/orders/claims/page.mdx": "2025-05-30T13:27:39.540Z", + "app/orders/fulfillments/page.mdx": "2025-05-30T13:28:08.998Z", + "app/customers/page.mdx": "2025-05-30T13:27:11.744Z", + "app/orders/edit/page.mdx": "2025-05-30T13:27:51.495Z", + "app/products/collections/page.mdx": "2025-05-30T13:29:05.948Z", + "app/customers/manage/page.mdx": "2025-05-30T13:27:02.851Z", "app/discounts/create/page.mdx": "2024-05-03T17:36:38+03:00", - "app/orders/payments/page.mdx": "2025-02-17T15:10:24.250Z", + "app/orders/payments/page.mdx": "2025-05-30T13:28:21.451Z", "app/discounts/page.mdx": "2024-05-03T17:36:38+03:00", - "app/orders/exchanges/page.mdx": "2025-02-17T15:14:13.676Z", - "app/products/create/page.mdx": "2025-02-25T15:02:02.160Z", - "app/products/edit/page.mdx": "2025-02-19T10:18:34.689Z", - "app/products/variants/page.mdx": "2025-02-19T12:45:06.674Z", - "app/products/create/bundle/page.mdx": "2025-02-18T12:17:32.166Z", - "app/products/create/multi-part/page.mdx": "2025-02-18T12:17:29.629Z", - "app/promotions/campaigns/page.mdx": "2025-02-19T09:02:49.193Z", - "app/promotions/create/page.mdx": "2025-02-19T10:13:44.835Z", - "app/promotions/manage/page.mdx": "2025-02-19T09:01:11.841Z", - "app/promotions/page.mdx": "2025-02-19T09:00:12.501Z", - "app/price-lists/create/page.mdx": "2025-02-19T10:11:33.113Z", - "app/price-lists/manage/page.mdx": "2025-02-19T10:35:49.881Z", - "app/price-lists/page.mdx": "2025-02-19T09:51:32.546Z", - "app/settings/tax-regions/page.mdx": "2025-05-09T13:58:40.440Z", - "app/settings/locations-and-shipping/locations/page.mdx": "2025-04-17T13:47:40.883Z", - "app/settings/locations-and-shipping/page.mdx": "2025-02-19T17:23:45.824Z", - "app/settings/locations-and-shipping/shipping-profiles/page.mdx": "2025-02-19T17:36:46.339Z", - "app/settings/product-tags/page.mdx": "2025-02-19T17:36:25.102Z", - "app/settings/product-types/page.mdx": "2025-02-19T17:36:16.496Z", - "app/settings/developer/publishable-api-keys/page.mdx": "2025-02-25T16:15:29.847Z", - "app/settings/developer/secret-api-keys/page.mdx": "2025-02-25T16:17:40.621Z", + "app/orders/exchanges/page.mdx": "2025-05-30T13:27:55.646Z", + "app/products/create/page.mdx": "2025-05-30T13:29:24.876Z", + "app/products/edit/page.mdx": "2025-05-30T13:29:29.625Z", + "app/products/variants/page.mdx": "2025-05-30T13:29:45.049Z", + "app/products/create/bundle/page.mdx": "2025-05-30T13:29:15.958Z", + "app/products/create/multi-part/page.mdx": "2025-05-30T13:29:20.321Z", + "app/promotions/campaigns/page.mdx": "2025-05-30T13:29:54.241Z", + "app/promotions/create/page.mdx": "2025-05-30T13:29:58.799Z", + "app/promotions/manage/page.mdx": "2025-05-30T13:30:02.678Z", + "app/promotions/page.mdx": "2025-05-30T13:30:08.538Z", + "app/price-lists/create/page.mdx": "2025-05-30T13:28:41.126Z", + "app/price-lists/manage/page.mdx": "2025-05-30T13:28:47.929Z", + "app/price-lists/page.mdx": "2025-05-30T13:28:53.668Z", + "app/settings/tax-regions/page.mdx": "2025-05-30T13:31:21.021Z", + "app/settings/locations-and-shipping/locations/page.mdx": "2025-05-30T13:30:33.160Z", + "app/settings/locations-and-shipping/page.mdx": "2025-05-30T13:30:41.759Z", + "app/settings/locations-and-shipping/shipping-profiles/page.mdx": "2025-05-30T13:30:37.452Z", + "app/settings/product-tags/page.mdx": "2025-05-30T13:30:46.705Z", + "app/settings/product-types/page.mdx": "2025-05-30T13:30:50.623Z", + "app/settings/developer/publishable-api-keys/page.mdx": "2025-05-30T13:30:19.734Z", + "app/settings/developer/secret-api-keys/page.mdx": "2025-05-30T13:30:23.919Z", "app/settings/developer/workflows/page.mdx": "2025-02-25T15:52:48.349Z", - "app/reset-password/page.mdx": "2025-04-17T08:29:28.890Z" + "app/reset-password/page.mdx": "2025-05-30T13:30:13.055Z" } \ No newline at end of file diff --git a/www/apps/user-guide/next.config.mjs b/www/apps/user-guide/next.config.mjs index 5bdf587934..3361fc4e79 100644 --- a/www/apps/user-guide/next.config.mjs +++ b/www/apps/user-guide/next.config.mjs @@ -11,8 +11,11 @@ import { resolveAdmonitionsPlugin, crossProjectLinksPlugin, prerequisitesLinkFixerPlugin, + remarkAttachFrontmatterDataPlugin, + recmaInjectMdxDataPlugin, } from "remark-rehype-plugins" import bundleAnalyzer from "@next/bundle-analyzer" +import withExtractedTableOfContents from "@stefanprobst/rehype-extract-toc" const withMDX = mdx({ extension: /\.mdx?$/, @@ -92,12 +95,15 @@ const withMDX = mdx({ checkLinksType: "value", }, ], + [withExtractedTableOfContents], ], remarkPlugins: [ [remarkFrontmatter], [remarkDirective], [resolveAdmonitionsPlugin], + [remarkAttachFrontmatterDataPlugin], ], + recmaPlugins: [[recmaInjectMdxDataPlugin]], jsx: true, }, }) diff --git a/www/apps/user-guide/package.json b/www/apps/user-guide/package.json index 4d21dffe65..334f1814ea 100644 --- a/www/apps/user-guide/package.json +++ b/www/apps/user-guide/package.json @@ -18,6 +18,7 @@ "@mdx-js/react": "^3.1.0", "@medusajs/icons": "2.8.3", "@next/mdx": "15.0.4", + "@stefanprobst/rehype-extract-toc": "^3.0.0", "clsx": "^2.1.0", "docs-ui": "*", "next": "15.0.4", diff --git a/www/apps/user-guide/public/images/api-key-icon.png b/www/apps/user-guide/public/images/api-key-icon.png new file mode 100644 index 0000000000..88d8166f9f Binary files /dev/null and b/www/apps/user-guide/public/images/api-key-icon.png differ diff --git a/www/apps/user-guide/public/images/auth-icon.png b/www/apps/user-guide/public/images/auth-icon.png new file mode 100644 index 0000000000..c3afa03d74 Binary files /dev/null and b/www/apps/user-guide/public/images/auth-icon.png differ diff --git a/www/apps/user-guide/public/images/cart-icon.png b/www/apps/user-guide/public/images/cart-icon.png new file mode 100644 index 0000000000..75a37f623d Binary files /dev/null and b/www/apps/user-guide/public/images/cart-icon.png differ diff --git a/www/apps/user-guide/public/images/currency-icon.png b/www/apps/user-guide/public/images/currency-icon.png new file mode 100644 index 0000000000..fef1c2f7e2 Binary files /dev/null and b/www/apps/user-guide/public/images/currency-icon.png differ diff --git a/www/apps/user-guide/public/images/customer-icon.png b/www/apps/user-guide/public/images/customer-icon.png new file mode 100644 index 0000000000..b1deb68afc Binary files /dev/null and b/www/apps/user-guide/public/images/customer-icon.png differ diff --git a/www/apps/user-guide/public/images/fulfillment-icon.png b/www/apps/user-guide/public/images/fulfillment-icon.png new file mode 100644 index 0000000000..efbf148a01 Binary files /dev/null and b/www/apps/user-guide/public/images/fulfillment-icon.png differ diff --git a/www/apps/user-guide/public/images/get-started-card-dark.png b/www/apps/user-guide/public/images/get-started-card-dark.png new file mode 100644 index 0000000000..cf78ad0c31 Binary files /dev/null and b/www/apps/user-guide/public/images/get-started-card-dark.png differ diff --git a/www/apps/user-guide/public/images/get-started-card.png b/www/apps/user-guide/public/images/get-started-card.png new file mode 100644 index 0000000000..5b05ed9b27 Binary files /dev/null and b/www/apps/user-guide/public/images/get-started-card.png differ diff --git a/www/apps/user-guide/public/images/inventory-icon.png b/www/apps/user-guide/public/images/inventory-icon.png new file mode 100644 index 0000000000..7632438bac Binary files /dev/null and b/www/apps/user-guide/public/images/inventory-icon.png differ diff --git a/www/apps/user-guide/public/images/order-icon.png b/www/apps/user-guide/public/images/order-icon.png new file mode 100644 index 0000000000..8869a30ec8 Binary files /dev/null and b/www/apps/user-guide/public/images/order-icon.png differ diff --git a/www/apps/user-guide/public/images/payment-icon.png b/www/apps/user-guide/public/images/payment-icon.png new file mode 100644 index 0000000000..124d62965d Binary files /dev/null and b/www/apps/user-guide/public/images/payment-icon.png differ diff --git a/www/apps/user-guide/public/images/pricing-icon.png b/www/apps/user-guide/public/images/pricing-icon.png new file mode 100644 index 0000000000..ae0e8ad462 Binary files /dev/null and b/www/apps/user-guide/public/images/pricing-icon.png differ diff --git a/www/apps/user-guide/public/images/product-icon.png b/www/apps/user-guide/public/images/product-icon.png new file mode 100644 index 0000000000..8fdb4f0d0c Binary files /dev/null and b/www/apps/user-guide/public/images/product-icon.png differ diff --git a/www/apps/user-guide/public/images/promotion-icon.png b/www/apps/user-guide/public/images/promotion-icon.png new file mode 100644 index 0000000000..640200620b Binary files /dev/null and b/www/apps/user-guide/public/images/promotion-icon.png differ diff --git a/www/apps/user-guide/public/images/region-icon.png b/www/apps/user-guide/public/images/region-icon.png new file mode 100644 index 0000000000..72fb2b63e6 Binary files /dev/null and b/www/apps/user-guide/public/images/region-icon.png differ diff --git a/www/apps/user-guide/public/images/sales-channel-icon.png b/www/apps/user-guide/public/images/sales-channel-icon.png new file mode 100644 index 0000000000..47867c1508 Binary files /dev/null and b/www/apps/user-guide/public/images/sales-channel-icon.png differ diff --git a/www/apps/user-guide/public/images/stock-location-icon.png b/www/apps/user-guide/public/images/stock-location-icon.png new file mode 100644 index 0000000000..61674b2f5b Binary files /dev/null and b/www/apps/user-guide/public/images/stock-location-icon.png differ diff --git a/www/apps/user-guide/public/images/tax-icon.png b/www/apps/user-guide/public/images/tax-icon.png new file mode 100644 index 0000000000..2be16099b4 Binary files /dev/null and b/www/apps/user-guide/public/images/tax-icon.png differ diff --git a/www/apps/user-guide/public/images/user-icon.png b/www/apps/user-guide/public/images/user-icon.png new file mode 100644 index 0000000000..bff05107f0 Binary files /dev/null and b/www/apps/user-guide/public/images/user-icon.png differ diff --git a/www/packages/docs-ui/src/components/AiAssistant/ChatWindow/index.tsx b/www/packages/docs-ui/src/components/AiAssistant/ChatWindow/index.tsx index c60e5e1c5d..213adbcade 100644 --- a/www/packages/docs-ui/src/components/AiAssistant/ChatWindow/index.tsx +++ b/www/packages/docs-ui/src/components/AiAssistant/ChatWindow/index.tsx @@ -142,10 +142,10 @@ export const AiAssistantChatWindow = () => { />
{ const isExternal = useIsExternalLink({ href }) @@ -26,7 +36,8 @@ export const CardLayoutMini = ({ "hover:shadow-elevation-card-hover dark:hover:shadow-elevation-card-hover-dark", "bg-medusa-tag-neutral-bg dark:bg-medusa-bg-component", "hover:bg-medusa-tag-neutral-bg-hover dark:hover:bg-medusa-bg-component-hover", - "w-fit transition-all" + "w-fit transition-[shadow,background]", + className )} >
)} @@ -64,12 +75,12 @@ export const CardLayoutMini = ({ "shadow-elevation-card-rest dark:shadow-elevation-card-rest-dark", "rounded-docs_xs" )} - width={45} - height={36} + width={imageDimensions.width} + height={imageDimensions.height} alt={title || text || ""} style={{ - width: "45px", - height: "36px", + width: `${imageDimensions.width}px`, + height: `${imageDimensions.height}px`, }} /> )} @@ -85,16 +96,28 @@ export const CardLayoutMini = ({ )}
- - {isExternal ? : } - + {!closeable && ( + + {isExternal ? : } + + )} {href && ( )} + {closeable && ( + + )}
) diff --git a/www/packages/docs-ui/src/components/Card/index.tsx b/www/packages/docs-ui/src/components/Card/index.tsx index 102b339555..16d0fcffaa 100644 --- a/www/packages/docs-ui/src/components/Card/index.tsx +++ b/www/packages/docs-ui/src/components/Card/index.tsx @@ -5,6 +5,7 @@ import { IconProps } from "@medusajs/icons/dist/types" import { CardLargeLayout } from "./Layout/Large" import { CardFillerLayout } from "./Layout/Filler" import { CardLayoutMini } from "./Layout/Mini" +import { LinkProps } from "next/link" export type CardProps = { type?: "default" | "large" | "filler" | "mini" @@ -15,6 +16,10 @@ export type CardProps = { light: string dark: string } + imageDimensions?: { + width: number + height: number + } title?: string text?: string href?: string @@ -24,6 +29,9 @@ export type CardProps = { children?: React.ReactNode badge?: BadgeProps highlightText?: string[] + closeable?: boolean + onClose?: () => void + hrefProps?: Partial> } export const Card = ({ type = "default", ...props }: CardProps) => { diff --git a/www/packages/docs-ui/src/components/ContentMenu/Actions/index.tsx b/www/packages/docs-ui/src/components/ContentMenu/Actions/index.tsx new file mode 100644 index 0000000000..63ec3953a1 --- /dev/null +++ b/www/packages/docs-ui/src/components/ContentMenu/Actions/index.tsx @@ -0,0 +1,46 @@ +"use client" + +import Link from "next/link" +import React from "react" +import { MarkdownIcon } from "../../Icons/Markdown" +import { useAiAssistant, useSiteConfig } from "../../../providers" +import { usePathname } from "next/navigation" +import { BroomSparkle } from "@medusajs/icons" +import { useAiAssistantChat } from "../../../providers/AiAssistant/Chat" + +export const ContentMenuActions = () => { + const { + config: { baseUrl, basePath }, + } = useSiteConfig() + const pathname = usePathname() + const { setChatOpened } = useAiAssistant() + const { setQuestion, loading } = useAiAssistantChat() + const pageUrl = `${baseUrl}${basePath}${pathname}` + + const handleAiAssistantClick = () => { + if (loading) { + return + } + setQuestion(`Explain the page ${pageUrl}`) + setChatOpened(true) + } + + return ( +
+ + + View as Markdown + + +
+ ) +} diff --git a/www/packages/docs-ui/src/components/ContentMenu/Products/index.tsx b/www/packages/docs-ui/src/components/ContentMenu/Products/index.tsx new file mode 100644 index 0000000000..72b00541dd --- /dev/null +++ b/www/packages/docs-ui/src/components/ContentMenu/Products/index.tsx @@ -0,0 +1,58 @@ +"use client" + +import React, { useMemo } from "react" +import { useSiteConfig } from "../../../providers" +import { products } from "../../../constants" +import { Product } from "types" +import { BorderedIcon } from "../../BorderedIcon" +import clsx from "clsx" + +export const ContentMenuProducts = () => { + const { frontmatter, config } = useSiteConfig() + + const loadedProducts = useMemo(() => { + return frontmatter.products + ?.sort() + .map((product) => { + return products.find( + (p) => p.name.toLowerCase() === product.toLowerCase() + ) + }) + .filter(Boolean) as Product[] + }, [frontmatter.products]) + + if (!loadedProducts?.length) { + return null + } + + const getProductUrl = (product: Product) => { + return `${config.baseUrl}${product.path}` + } + + const getProductImageUrl = (product: Product) => { + return `${config.basePath}${product.image}` + } + + return ( +
+ + Modules used + + {loadedProducts.map((product, index) => ( + + + + {product.title} + + + ))} +
+ ) +} diff --git a/www/packages/docs-ui/src/components/ContentMenu/Toc/index.tsx b/www/packages/docs-ui/src/components/ContentMenu/Toc/index.tsx new file mode 100644 index 0000000000..043e9b873c --- /dev/null +++ b/www/packages/docs-ui/src/components/ContentMenu/Toc/index.tsx @@ -0,0 +1,143 @@ +"use client" + +import React, { useEffect } from "react" +import { ToCItem, ToCItemUi } from "types" +import { + ActiveOnScrollItem, + useActiveOnScroll, + useScrollController, +} from "../../../hooks" +import clsx from "clsx" +import Link from "next/link" +import { useSiteConfig } from "../../../providers" +import { Loading } from "../../Loading" + +export const ContentMenuToc = () => { + const { toc: items, frontmatter, setToc } = useSiteConfig() + const { items: generatedItems, activeItemId } = useActiveOnScroll({ + maxLevel: 4, + }) + + const formatHeadingContent = (content: string | null): string => { + return content?.replaceAll(/#$/g, "") || "" + } + + const formatHeadingObject = ({ + heading, + children, + }: ActiveOnScrollItem): ToCItemUi => { + const level = parseInt(heading.tagName.replace("H", "")) + return { + title: formatHeadingContent(heading.textContent), + id: heading.id, + level, + children: children?.map(formatHeadingObject), + associatedHeading: heading as HTMLHeadingElement, + } + } + + useEffect(() => { + if ( + frontmatter.generate_toc && + generatedItems && + items?.length !== generatedItems.length + ) { + const tocItems: ToCItem[] = generatedItems.map(formatHeadingObject) + setToc(tocItems) + } + }, [frontmatter, generatedItems]) + + useEffect(() => { + const activeElement = document.querySelector( + ".toc-item a[href='#" + activeItemId + "']" + ) as HTMLAnchorElement + if (!activeElement) { + return + } + + activeElement.scrollIntoView({ + behavior: "smooth", + block: "center", + inline: "nearest", + }) + }, [activeItemId]) + + if (items && !items.length) { + return <> + } + + return ( +
+
+ {items !== null && ( + + )} + {items === null && } +
+ ) +} + +type TocListProps = { + items: ToCItem[] + activeItemId: string + className?: string +} + +const TocList = ({ items, activeItemId, className }: TocListProps) => { + return ( +
    + {items.map((item) => ( + + ))} +
+ ) +} + +type TocItemProps = { + item: ToCItem + activeItemId: string +} + +const TocItem = ({ item, activeItemId }: TocItemProps) => { + const { scrollToElement } = useScrollController() + return ( +
  • + { + e.preventDefault() + history.pushState({}, "", `#${item.id}`) + const elm = document.getElementById(item.id) as HTMLElement + scrollToElement(elm) + }} + > + {item.title} + + {(item.children?.length ?? 0) > 0 && ( + + )} +
  • + ) +} + +const EmptyTocItems = () => { + return ( +
    + +
    + ) +} diff --git a/www/packages/docs-ui/src/components/ContentMenu/Version/index.tsx b/www/packages/docs-ui/src/components/ContentMenu/Version/index.tsx new file mode 100644 index 0000000000..185221925f --- /dev/null +++ b/www/packages/docs-ui/src/components/ContentMenu/Version/index.tsx @@ -0,0 +1,58 @@ +import React, { useEffect, useState } from "react" +import { Card } from "../../Card" +import { useIsBrowser, useSiteConfig } from "../../../providers" +import clsx from "clsx" + +const LOCAL_STORAGE_KEY = "last-version" + +export const ContentMenuVersion = () => { + const { + config: { version }, + } = useSiteConfig() + const [showNewVersion, setShowNewVersion] = useState(false) + const { isBrowser } = useIsBrowser() + + useEffect(() => { + if (!isBrowser) { + return + } + + const storedVersion = localStorage.getItem(LOCAL_STORAGE_KEY) + if (storedVersion !== version.number) { + setShowNewVersion(true) + } + }, [isBrowser]) + + const handleClose = () => { + if (!showNewVersion) { + return + } + + setShowNewVersion(false) + localStorage.setItem(LOCAL_STORAGE_KEY, version.number) + } + + return ( + + ) +} diff --git a/www/packages/docs-ui/src/components/ContentMenu/index.tsx b/www/packages/docs-ui/src/components/ContentMenu/index.tsx new file mode 100644 index 0000000000..1ef36541cc --- /dev/null +++ b/www/packages/docs-ui/src/components/ContentMenu/index.tsx @@ -0,0 +1,32 @@ +"use client" + +import clsx from "clsx" +import React from "react" +import { ContentMenuVersion } from "./Version" +import { ContentMenuToc } from "./Toc" +import { ContentMenuActions } from "./Actions" +import { ContentMenuProducts } from "./Products" +import { useLayout } from "../../providers" + +export const ContentMenu = () => { + const { showCollapsedNavbar } = useLayout() + + return ( +
    + +
    + + + +
    +
    + ) +} diff --git a/www/packages/docs-ui/src/components/Heading/H1/index.tsx b/www/packages/docs-ui/src/components/Heading/H1/index.tsx index c9415dfb92..f28c1fda75 100644 --- a/www/packages/docs-ui/src/components/Heading/H1/index.tsx +++ b/www/packages/docs-ui/src/components/Heading/H1/index.tsx @@ -1,13 +1,11 @@ import clsx from "clsx" import React from "react" -import { LlmDropdown } from "../../LlmDropdown" export type H1Props = React.HTMLAttributes & { id?: string - hideLlmDropdown?: boolean } -export const H1 = ({ className, hideLlmDropdown, ...props }: H1Props) => { +export const H1 = ({ className, ...props }: H1Props) => { return (

    { )} {...props} /> - {!hideLlmDropdown && }

    ) } diff --git a/www/packages/docs-ui/src/components/InjectedMDXData/index.tsx b/www/packages/docs-ui/src/components/InjectedMDXData/index.tsx new file mode 100644 index 0000000000..7207b0e120 --- /dev/null +++ b/www/packages/docs-ui/src/components/InjectedMDXData/index.tsx @@ -0,0 +1,27 @@ +"use client" + +import React, { useEffect } from "react" +import { FrontMatter, ToCItem } from "types" +import { useSiteConfig } from "../../providers" + +type InjectedMDXDataProps = { + frontmatter: FrontMatter + toc: ToCItem[] +} + +/** + * This component is injected by a recma plugin into MDX documents. + */ +export const InjectedMDXData = ({ frontmatter, toc }: InjectedMDXDataProps) => { + const { setFrontmatter, setToc } = useSiteConfig() + + useEffect(() => { + setFrontmatter(frontmatter) + }, [frontmatter]) + + useEffect(() => { + setToc(toc) + }, [toc]) + + return <> +} diff --git a/www/packages/docs-ui/src/components/Link/index.tsx b/www/packages/docs-ui/src/components/Link/index.tsx index 5009bed334..95515bab24 100644 --- a/www/packages/docs-ui/src/components/Link/index.tsx +++ b/www/packages/docs-ui/src/components/Link/index.tsx @@ -10,6 +10,7 @@ export type LinkProps = Partial & children?: React.ReactNode className?: string withIcon?: boolean + variant?: "default" | "content" } export const Link = ({ @@ -17,6 +18,7 @@ export const Link = ({ children, className, withIcon = false, + variant = "default", ...rest }: LinkProps) => { if (href?.replace(/#.*$/, "").endsWith("page.mdx")) { @@ -27,7 +29,12 @@ export const Link = ({ href={href || ""} {...rest} className={clsx( - "text-medusa-fg-interactive hover:text-medusa-fg-interactive-hover", + variant === "default" && + "text-medusa-fg-interactive hover:text-medusa-fg-interactive-hover", + variant === "content" && [ + "border-b border-medusa-border-strong hover:border-medusa-fg-interactive", + "transition-all duration-200", + ], withIcon && "flex gap-0.25 items-center group", className )} diff --git a/www/packages/docs-ui/src/components/LlmDropdown/index.tsx b/www/packages/docs-ui/src/components/LlmDropdown/index.tsx deleted file mode 100644 index 0c3c477e28..0000000000 --- a/www/packages/docs-ui/src/components/LlmDropdown/index.tsx +++ /dev/null @@ -1,69 +0,0 @@ -"use client" - -import React, { useRef, useState } from "react" -import { useAiAssistant, useSiteConfig } from "../../providers" -import { usePathname } from "next/navigation" -import { AiAssistent, Book } from "@medusajs/icons" -import { DropdownMenu, Menu } from "../Menu" -import { MarkdownIcon } from "../Icons/Markdown" -import { useAiAssistantChat } from "../../providers/AiAssistant/Chat" -import clsx from "clsx" -import { useClickOutside } from "../.." - -export const LlmDropdown = () => { - const { - config: { baseUrl, basePath }, - } = useSiteConfig() - const pathname = usePathname() - const [open, setOpen] = useState(false) - const { setChatOpened } = useAiAssistant() - const { setQuestion, loading } = useAiAssistantChat() - const ref = useRef(null) - useClickOutside({ - elmRef: ref, - onClickOutside: () => { - setOpen(false) - }, - }) - - const pageUrl = `${baseUrl}${basePath}${pathname}` - - return ( - } - menuComponent={ - , - openInNewTab: true, - }, - { - type: "action", - title: "Ask AI Assistant", - action: () => { - if (loading) { - return - } - setQuestion(`Explain the page ${pageUrl}`) - setChatOpened(true) - setOpen(false) - }, - icon: , - }, - ]} - className={clsx( - "absolute right-0 top-[calc(100%+8px)] w-max", - !open && "hidden" - )} - /> - } - className="hidden md:block" - /> - ) -} diff --git a/www/packages/docs-ui/src/components/MainNav/Items/Dropdown/index.tsx b/www/packages/docs-ui/src/components/MainNav/Items/Dropdown/index.tsx index b8cd4840ed..7479c5bad6 100644 --- a/www/packages/docs-ui/src/components/MainNav/Items/Dropdown/index.tsx +++ b/www/packages/docs-ui/src/components/MainNav/Items/Dropdown/index.tsx @@ -46,7 +46,7 @@ export const MainNavItemDropdown = ({ return (
    { const { config: { version }, } = useSiteConfig() - const [showNewBadge, setShowNewBadge] = useState(false) - const { isBrowser } = useIsBrowser() - - useEffect(() => { - if (!isBrowser) { - return - } - - const storedVersion = localStorage.getItem(LOCAL_STORAGE_SUFFIX) - if (storedVersion !== version.number) { - setShowNewBadge(true) - } - }, [isBrowser]) - - const afterHover = () => { - if (!showNewBadge) { - return - } - - setShowNewBadge(false) - localStorage.setItem(LOCAL_STORAGE_SUFFIX, version.number) - } return ( - + v{version.number} - {showNewBadge && ( - - )} diff --git a/www/packages/docs-ui/src/components/MainNav/index.tsx b/www/packages/docs-ui/src/components/MainNav/index.tsx index 8fd2ffac98..846ef81e1c 100644 --- a/www/packages/docs-ui/src/components/MainNav/index.tsx +++ b/www/packages/docs-ui/src/components/MainNav/index.tsx @@ -71,14 +71,6 @@ export const MainNav = ({ className, itemsClassName }: MainNavProps) => { >
    - - · - { className="text-medusa-fg-subtle" wrapperClassName="z-10" /> - {!showCollapsedNavbar && ( - · - )}
    diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx index bd3f990464..b07f0a4db1 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx @@ -6,7 +6,7 @@ import React, { useEffect, useMemo, useState } from "react" import { Sidebar } from "types" import { Badge, Loading, SidebarItem, useSidebar } from "../../../.." import clsx from "clsx" -import { MinusMini, PlusMini } from "@medusajs/icons" +import { TriangleDownMini, TriangleUpMini } from "@medusajs/icons" export type SidebarItemCategoryProps = { item: Sidebar.SidebarItemCategory @@ -109,8 +109,8 @@ export const SidebarItemCategory = ({ )} {!item.additionalElms && ( <> - {open && } - {!open && } + {open && } + {!open && } )}
    diff --git a/www/packages/docs-ui/src/components/Toc/Item/index.tsx b/www/packages/docs-ui/src/components/Toc/Item/index.tsx deleted file mode 100644 index 64668b3fe2..0000000000 --- a/www/packages/docs-ui/src/components/Toc/Item/index.tsx +++ /dev/null @@ -1,33 +0,0 @@ -"use client" - -import clsx from "clsx" -import React, { useMemo } from "react" -import { ToCItemUi } from "types" -import { TocList } from "../List" - -export type TocItemProps = { - item: ToCItemUi - activeItem: string -} - -export const TocItem = ({ item, activeItem }: TocItemProps) => { - const isActive = useMemo(() => item.id === activeItem, [item, activeItem]) - - return ( -
  • - - {(item.children?.length || 0) > 0 && ( - - )} -
  • - ) -} diff --git a/www/packages/docs-ui/src/components/Toc/List/index.tsx b/www/packages/docs-ui/src/components/Toc/List/index.tsx deleted file mode 100644 index 597a7a7ba2..0000000000 --- a/www/packages/docs-ui/src/components/Toc/List/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import clsx from "clsx" -import React from "react" -import { ToCItemUi } from "types" -import { TocItem } from "../Item" - -export type TocListProps = { - items: ToCItemUi[] - topLevel?: boolean - activeItem: string -} - -export const TocList = ({ - items, - topLevel = false, - activeItem, -}: TocListProps) => { - return ( -
      - {items.map((item, key) => ( - - ))} -
    - ) -} diff --git a/www/packages/docs-ui/src/components/Toc/Menu/index.tsx b/www/packages/docs-ui/src/components/Toc/Menu/index.tsx deleted file mode 100644 index 79c83fba02..0000000000 --- a/www/packages/docs-ui/src/components/Toc/Menu/index.tsx +++ /dev/null @@ -1,80 +0,0 @@ -"use client" - -import { EllipseMiniSolid } from "@medusajs/icons" -import clsx from "clsx" -import React from "react" -import { ToCItemUi } from "types" -import { Button, useScrollController } from "../../.." - -export type TocMenuProps = { - items: ToCItemUi[] - activeItem: string - show: boolean - setShow: (value: boolean) => void -} - -export const TocMenu = ({ items, activeItem, show, setShow }: TocMenuProps) => { - const { scrollToElement } = useScrollController() - - const getItemElm = (item: ToCItemUi) => { - const isActive = item.id === activeItem - const hasChildren = item.children?.length || 0 > 0 - return ( -
  • - - {hasChildren && ( -
      - {item.children!.map((childItem, index) => ( - - {getItemElm(childItem)} - - ))} -
    - )} -
  • - ) - } - - return ( -
    setShow(false)} - > -
      - {items.map((item, index) => ( - {getItemElm(item)} - ))} -
    -
    - ) -} diff --git a/www/packages/docs-ui/src/components/Toc/index.tsx b/www/packages/docs-ui/src/components/Toc/index.tsx deleted file mode 100644 index 02a0bc53ac..0000000000 --- a/www/packages/docs-ui/src/components/Toc/index.tsx +++ /dev/null @@ -1,102 +0,0 @@ -"use client" - -import React, { useEffect, useState } from "react" -import { ToCItemUi } from "types" -import { - ActiveOnScrollItem, - isElmWindow, - useActiveOnScroll, - useIsBrowser, - useLayout, - useScrollController, -} from "../.." -import { TocList } from "./List" -import clsx from "clsx" -import { TocMenu } from "./Menu" - -export const Toc = () => { - const [items, setItems] = useState([]) - const [showMenu, setShowMenu] = useState(false) - const { isBrowser } = useIsBrowser() - const { items: headingItems, activeItemId } = useActiveOnScroll({}) - const [maxHeight, setMaxHeight] = useState(0) - const { scrollableElement } = useScrollController() - const { showCollapsedNavbar } = useLayout() - - const formatHeadingContent = (content: string | null): string => { - return content?.replaceAll(/#$/g, "") || "" - } - - const formatHeadingObject = ({ - heading, - children, - }: ActiveOnScrollItem): ToCItemUi => { - const level = parseInt(heading.tagName.replace("H", "")) - return { - title: formatHeadingContent(heading.textContent), - id: heading.id, - level, - children: children?.map(formatHeadingObject), - associatedHeading: heading as HTMLHeadingElement, - } - } - - useEffect(() => { - setItems(headingItems.map(formatHeadingObject)) - }, [headingItems]) - - const handleResize = () => { - const extraMargin = showCollapsedNavbar ? 112 : 56 - const offset = - (scrollableElement instanceof HTMLElement - ? scrollableElement.offsetTop - : 0) + extraMargin - - setMaxHeight( - (isElmWindow(scrollableElement) - ? scrollableElement.innerHeight - : scrollableElement?.clientHeight || 0) - offset - ) - } - - useEffect(() => { - if (!isBrowser) { - return - } - - handleResize() - - window.addEventListener("resize", handleResize) - - return () => { - window.removeEventListener("resize", handleResize) - } - }, [isBrowser]) - - return ( -
    setShowMenu(true)}> -
    = 1000 && "-translate-y-1/2" - )} - onMouseOver={() => setShowMenu(true)} - style={{ - maxHeight, - }} - > - -
    - -
    - ) -} diff --git a/www/packages/docs-ui/src/components/index.ts b/www/packages/docs-ui/src/components/index.ts index 5a0891d4ca..280f8d6201 100644 --- a/www/packages/docs-ui/src/components/index.ts +++ b/www/packages/docs-ui/src/components/index.ts @@ -31,6 +31,7 @@ export * from "./Heading" export * from "./HooksLoader" export * from "./IconHeadline" export * from "./Icons" +export * from "./InjectedMDXData" export * from "./InlineIcon" export * from "./InlineThemeImage" export * from "./InlineCode" diff --git a/www/packages/docs-ui/src/constants.tsx b/www/packages/docs-ui/src/constants.tsx index ac894f104f..0bd7fba97b 100644 --- a/www/packages/docs-ui/src/constants.tsx +++ b/www/packages/docs-ui/src/constants.tsx @@ -1,4 +1,4 @@ -import { NavigationItem } from "types" +import { NavigationItem, Product } from "types" export const GITHUB_ISSUES_LINK = "https://github.com/medusajs/medusa/issues/new/choose" @@ -355,3 +355,132 @@ export const navDropdownItems: NavigationItem[] = [ link: "/user-guide", }, ] + +export const products: Product[] = [ + { + type: "commerce", + name: "api key", + path: "/resources/commerce-modules/api-key", + title: "API Key", + image: "/images/api-key-icon.png", + }, + { + type: "commerce", + name: "auth", + path: "/resources/commerce-modules/auth", + title: "Auth", + image: "/images/auth-icon.png", + }, + { + type: "commerce", + name: "cart", + path: "/resources/commerce-modules/cart", + title: "Cart", + image: "/images/cart-icon.png", + }, + { + type: "commerce", + name: "currency", + path: "/resources/commerce-modules/currency", + title: "Currency", + image: "/images/currency-icon.png", + }, + { + type: "commerce", + name: "customer", + path: "/resources/commerce-modules/customer", + title: "Customer", + image: "/images/customer-icon.png", + }, + { + type: "commerce", + name: "fulfillment", + path: "/resources/commerce-modules/fulfillment", + title: "Fulfillment", + image: "/images/fulfillment-icon.png", + }, + { + type: "commerce", + name: "inventory", + path: "/resources/commerce-modules/inventory", + title: "Inventory", + image: "/images/inventory-icon.png", + }, + { + type: "commerce", + name: "order", + path: "/resources/commerce-modules/order", + title: "Order", + image: "/images/order-icon.png", + }, + { + type: "commerce", + name: "payment", + path: "/resources/commerce-modules/payment", + title: "Payment", + image: "/images/payment-icon.png", + }, + { + type: "commerce", + name: "pricing", + path: "/resources/commerce-modules/pricing", + title: "Pricing", + image: "/images/pricing-icon.png", + }, + { + type: "commerce", + name: "product", + path: "/resources/commerce-modules/product", + title: "Product", + image: "/images/product-icon.png", + }, + { + type: "commerce", + name: "promotion", + path: "/resources/commerce-modules/promotion", + title: "Promotion", + image: "/images/promotion-icon.png", + }, + { + type: "commerce", + name: "region", + path: "/resources/commerce-modules/region", + title: "Region", + image: "/images/region-icon.png", + }, + { + type: "commerce", + name: "sales channel", + path: "/resources/commerce-modules/sales-channel", + title: "Sales Channel", + image: "/images/sales-channel-icon.png", + }, + { + type: "commerce", + name: "stock location", + path: "/resources/commerce-modules/stock-location", + title: "Stock Location", + image: "/images/stock-location-icon.png", + }, + // TODO need an image for this one + // { + // type: "commerce", + // name: "store", + // title: "Store", + // image: "/images/store-icon.png", + // }, + { + type: "commerce", + name: "tax", + path: "/resources/commerce-modules/tax", + title: "Tax", + image: "/images/tax-icon.png", + }, + { + type: "commerce", + name: "user", + path: "/resources/commerce-modules/user", + title: "User", + image: "/images/user-icon.png", + }, +] diff --git a/www/packages/docs-ui/src/hooks/use-active-on-scroll/index.tsx b/www/packages/docs-ui/src/hooks/use-active-on-scroll/index.tsx index 23cc46f4f2..fadd1d5cad 100644 --- a/www/packages/docs-ui/src/hooks/use-active-on-scroll/index.tsx +++ b/www/packages/docs-ui/src/hooks/use-active-on-scroll/index.tsx @@ -130,6 +130,29 @@ export const useActiveOnScroll = ({ ? scrollableElement.scrollHeight / 2 : 0 + if (scrollableElement?.scrollTop === 0) { + // set the first heading as active if the scrollable element is at the top + setActiveItemId( + items.length && useDefaultIfNoActive ? items[0].heading.id : "" + ) + + return + } else if ( + scrollableElement?.scrollTop + scrollableElement?.clientHeight >= + scrollableElement?.scrollHeight + ) { + // set the last heading as active if the scrollable element is at the bottom + let lastHeading = items[items.length - 1] + while (lastHeading?.children?.length) { + lastHeading = lastHeading.children[lastHeading.children.length - 1] + } + setActiveItemId( + lastHeading && useDefaultIfNoActive ? lastHeading.heading.id : "" + ) + + return + } + headings?.forEach((heading) => { if (heading.id === hash) { selectedHeadingByHash = heading as HTMLHeadingElement diff --git a/www/packages/docs-ui/src/layouts/main-content.tsx b/www/packages/docs-ui/src/layouts/main-content.tsx index 2b96343c53..63a966d278 100644 --- a/www/packages/docs-ui/src/layouts/main-content.tsx +++ b/www/packages/docs-ui/src/layouts/main-content.tsx @@ -2,22 +2,26 @@ import React, { useEffect } from "react" import clsx from "clsx" -import { MainNav, useIsBrowser, useLayout, useSidebar } from ".." +import { MainNav, useIsBrowser, useLayout, useSidebar, useSiteConfig } from ".." +import { ContentMenu } from "../components/ContentMenu" export type MainContentLayoutProps = { mainWrapperClasses?: string contentClassName?: string children: React.ReactNode + showContentMenu?: boolean } export const MainContentLayout = ({ children, mainWrapperClasses, contentClassName, + showContentMenu = true, }: MainContentLayoutProps) => { const { isBrowser } = useIsBrowser() const { desktopSidebarOpen } = useSidebar() const { mainContentRef } = useLayout() + const { frontmatter } = useSiteConfig() useEffect(() => { if (!isBrowser) { @@ -36,7 +40,7 @@ export const MainContentLayout = ({ "relative max-w-full", "h-full flex-1", "flex flex-col", - "gap-docs_0.5 lg:pt-docs_0.25 lg:mr-docs_0.25 scroll-m-docs_0.25", + "gap-docs_0.5 lg:py-docs_0.25 lg:mr-docs_0.25 scroll-m-docs_0.25", !desktopSidebarOpen && "lg:ml-docs_0.25", mainWrapperClasses )} @@ -47,7 +51,7 @@ export const MainContentLayout = ({ "flex-col items-center", "h-full w-full", "overflow-y-scroll overflow-x-hidden", - "md:rounded-t-docs_DEFAULT", + "md:rounded-docs_DEFAULT", "shadow-elevation-card-rest dark:shadow-elevation-card-rest-dark", mainWrapperClasses )} @@ -57,14 +61,16 @@ export const MainContentLayout = ({
    - {children} +
    {children}
    + {showContentMenu && !frontmatter.hide_content_menu && }
    ) diff --git a/www/packages/docs-ui/src/layouts/root.tsx b/www/packages/docs-ui/src/layouts/root.tsx index a0388eab6f..1add4268f8 100644 --- a/www/packages/docs-ui/src/layouts/root.tsx +++ b/www/packages/docs-ui/src/layouts/root.tsx @@ -1,13 +1,11 @@ import React from "react" import clsx from "clsx" import { RootProviders, Sidebar, SidebarProps } from "@/components" -import { Toc } from "../components/Toc" import { MainContentLayout, MainContentLayoutProps } from "./main-content" import { AiAssistantChatWindow } from "../components/AiAssistant/ChatWindow" export type RootLayoutProps = { bodyClassName?: string - showToc?: boolean sidebarProps?: SidebarProps showBreadcrumbs?: boolean ProvidersComponent: React.FC<{ children: React.ReactNode }> @@ -17,7 +15,6 @@ export type RootLayoutProps = { export const RootLayout = ({ bodyClassName, sidebarProps, - showToc = true, ProvidersComponent, ...mainProps }: RootLayoutProps) => { @@ -36,7 +33,6 @@ export const RootLayout = ({
    - {showToc && }
    diff --git a/www/packages/docs-ui/src/providers/Layout/index.tsx b/www/packages/docs-ui/src/providers/Layout/index.tsx index db91082086..15360d75c0 100644 --- a/www/packages/docs-ui/src/providers/Layout/index.tsx +++ b/www/packages/docs-ui/src/providers/Layout/index.tsx @@ -24,7 +24,7 @@ export const LayoutProvider = ({ const [showCollapsedNavbar, setShowCollapsedNavbar] = useState(false) useResizeObserver(mainContentRef as React.RefObject, () => { - if (disableResizeObserver || window.innerWidth < 1100) { + if (disableResizeObserver || window.innerWidth < 1024) { setShowCollapsedNavbar(false) return } diff --git a/www/packages/docs-ui/src/providers/SiteConifg/index.tsx b/www/packages/docs-ui/src/providers/SiteConifg/index.tsx index f9e08a4967..4aa1851994 100644 --- a/www/packages/docs-ui/src/providers/SiteConifg/index.tsx +++ b/www/packages/docs-ui/src/providers/SiteConifg/index.tsx @@ -1,13 +1,17 @@ "use client" import React, { createContext, useContext, useState } from "react" -import { DocsConfig } from "types" +import { DocsConfig, FrontMatter, ToCItem } from "types" import { globalConfig } from "../../global-config" import { GITHUB_ISSUES_LINK } from "../.." export type SiteConfigContextType = { config: DocsConfig setConfig: React.Dispatch> + frontmatter: FrontMatter + setFrontmatter: React.Dispatch> + toc: ToCItem[] | null + setToc: React.Dispatch> } const SiteConfigContext = createContext(null) @@ -37,12 +41,18 @@ export const SiteConfigProvider = ({ initConfig || {} ) ) + const [frontmatter, setFrontmatter] = useState({}) + const [toc, setToc] = useState(null) return ( {children} diff --git a/www/packages/remark-rehype-plugins/package.json b/www/packages/remark-rehype-plugins/package.json index 5504762276..440cf0af9c 100644 --- a/www/packages/remark-rehype-plugins/package.json +++ b/www/packages/remark-rehype-plugins/package.json @@ -30,9 +30,11 @@ "dependencies": { "@cloudinary/url-gen": "^1.17.0", "docs-utils": "*", + "slugify": "^1.6.6", "unified": "^11.0.4", "unist-builder": "3.0.0", - "unist-util-visit": "4.1.2" + "unist-util-visit": "4.1.2", + "vfile-matter": "^5.0.1" }, "devDependencies": { "@types/node": "^20.11.20", diff --git a/www/packages/remark-rehype-plugins/src/attach-frontmatter-data.ts b/www/packages/remark-rehype-plugins/src/attach-frontmatter-data.ts new file mode 100644 index 0000000000..71f057cda3 --- /dev/null +++ b/www/packages/remark-rehype-plugins/src/attach-frontmatter-data.ts @@ -0,0 +1,9 @@ +import { Transformer } from "unified" + +export function remarkAttachFrontmatterDataPlugin(): Transformer { + return async (tree, file) => { + const { matter } = await import("vfile-matter") + + matter(file) + } +} diff --git a/www/packages/remark-rehype-plugins/src/index.ts b/www/packages/remark-rehype-plugins/src/index.ts index e773d14203..7aa03fd846 100644 --- a/www/packages/remark-rehype-plugins/src/index.ts +++ b/www/packages/remark-rehype-plugins/src/index.ts @@ -3,6 +3,8 @@ export * from "./broken-link-checker.js" export * from "./change-links-md.js" export * from "./cloudinary-img.js" export * from "./cross-project-links.js" +export * from "./attach-frontmatter-data.js" +export * from "./inject-mdx-data.js" export * from "./local-links.js" export * from "./page-number.js" export * from "./prerequisites-link-fixer.js" diff --git a/www/packages/remark-rehype-plugins/src/inject-mdx-data.ts b/www/packages/remark-rehype-plugins/src/inject-mdx-data.ts new file mode 100644 index 0000000000..e2d9f011d1 --- /dev/null +++ b/www/packages/remark-rehype-plugins/src/inject-mdx-data.ts @@ -0,0 +1,345 @@ +import { + FrontMatter, + ObjectExpression, + ToCItem, + UnistFunctionDeclarationNode, + UnistNode, + UnistProgram, + UnistReturnStatementNode, +} from "types" +import type { Transformer } from "unified" + +type DataToc = Record[] + +type Options = { + isRemoteMdx?: boolean + mode?: "development" | "production" +} + +export function recmaInjectMdxDataPlugin(options?: Options): Transformer { + const isRemoteMdx = options?.isRemoteMdx || false + const mode = options?.mode || "development" + return async (tree, file) => { + const frontmatter: FrontMatter = file.data.matter || {} + const tocMaxDepth = frontmatter.toc_max_depth || 4 + let dataToc = (file.data.toc || []) as DataToc + if (dataToc.length > 0 && dataToc[0].depth === 1) { + dataToc = (dataToc[0].children || []) as DataToc + } + const toc: ToCItem[] = frontmatter.generate_toc + ? [] + : getToc(dataToc, tocMaxDepth) + + const program = tree as UnistProgram + for (const node of program.body) { + if (node.type === "FunctionDeclaration") { + const fnNode = node as UnistFunctionDeclarationNode + const returnStatement = fnNode.body.body.find( + (n) => n.type === "ReturnStatement" + ) + + if (!returnStatement) { + continue + } + + const returnChildren = getReturnChildren( + returnStatement as UnistReturnStatementNode + ) + + if (isRemoteMdx) { + handleRemoteMdx({ + returnChildren, + frontmatter, + toc, + mode, + }) + } else { + handleDefaultMdx({ + program, + returnChildren, + frontmatter, + toc, + }) + } + + return + } + } + } +} + +function handleDefaultMdx({ + program, + returnChildren, + frontmatter, + toc, +}: { + program: UnistProgram + returnChildren: UnistNode[] + frontmatter: FrontMatter + toc: ToCItem[] +}) { + program.body.unshift({ + type: "ImportDeclaration", + source: { type: "Literal", value: "docs-ui" }, + specifiers: [ + { + type: "ImportSpecifier", + imported: { type: "Identifier", name: "InjectedMDXData" }, + local: { type: "Identifier", name: "InjectedMDXData" }, + }, + ], + }) + + returnChildren.push({ + type: "JSXElement", + openingElement: { + type: "JSXOpeningElement", + name: { + type: "JSXIdentifier", + name: "InjectedMDXData", + }, + attributes: [ + { + type: "JSXAttribute", + name: { + type: "JSXIdentifier", + name: "frontmatter", + }, + value: { + type: "JSXExpressionContainer", + expression: { + type: "ObjectExpression", + properties: Object.entries(frontmatter).map(([key, value]) => ({ + type: "Property", + key: { + type: "Identifier", + name: key, + }, + value: { + type: "Literal", + value: value, + raw: JSON.stringify(value), + }, + kind: "init", + computed: false, + method: false, + shorthand: false, + })), + }, + }, + }, + { + type: "JSXAttribute", + name: { + type: "JSXIdentifier", + name: "toc", + }, + value: { + type: "JSXExpressionContainer", + expression: { + type: "ArrayExpression", + elements: getTocJSX(toc), + }, + }, + }, + ], + selfClosing: true, + }, + } as any) +} + +function handleRemoteMdx({ + returnChildren, + frontmatter, + toc, + mode, +}: { + returnChildren: UnistNode[] + frontmatter: FrontMatter + toc: ToCItem[] + mode: "development" | "production" +}) { + const functionName = mode === "development" ? "_jsxDEV" : "_jsx" + + returnChildren.push({ + type: "Literal", + value: "\n", + }) + + returnChildren.push({ + type: "CallExpression", + callee: { + type: "Identifier", + name: functionName, + }, + arguments: [ + { + type: "MemberExpression", + object: { + type: "Identifier", + name: "_components", + }, + property: { + type: "Identifier", + name: "InjectedMDXData", + }, + computed: false, + optional: false, + shorthand: false, + }, + { + type: "ObjectExpression", + properties: [ + { + type: "Property", + key: { type: "Identifier", name: "frontmatter" }, + value: { + type: "ObjectExpression", + properties: Object.entries(frontmatter).map(([key, value]) => ({ + type: "Property", + key: { + type: "Identifier", + name: key, + }, + value: { + type: "Literal", + value: value, + raw: JSON.stringify(value), + }, + kind: "init", + computed: false, + optional: false, + shorthand: false, + })), + }, + kind: "init", + computed: false, + optional: false, + shorthand: false, + }, + { + type: "Property", + key: { type: "Identifier", name: "toc" }, + value: { + type: "ArrayExpression", + elements: getTocJSX(toc), + }, + kind: "init", + computed: false, + optional: false, + shorthand: false, + }, + ], + }, + ], + } as any) +} + +function getReturnChildren(node: UnistReturnStatementNode): UnistNode[] { + const rootJSX = node.argument + + if (rootJSX.type === "JSXFragment") { + return rootJSX.children + } else if (rootJSX.type === "JSXElement") { + return [] + } + + const props = rootJSX.arguments.find( + (arg) => arg.type === "ObjectExpression" + ) as ObjectExpression | undefined + + if (!props) { + return [] + } + + const childrenProp = props.properties.find( + (prop) => prop.key.name === "children" + ) + + if (!childrenProp || childrenProp.value.type !== "ArrayExpression") { + return [] + } + + return childrenProp.value.elements as UnistNode[] +} + +function getToc(items: Record[], maxDepth: number): ToCItem[] { + const toc: ToCItem[] = [] + + items.forEach((i) => { + const depth = i.depth as number + if (depth > maxDepth) { + return + } + + const tocItem: ToCItem = { + title: i.value as string, + level: depth, + id: i.id as string, + children: [], + } + + if (i.children && Array.isArray(i.children) && i.children.length > 0) { + tocItem.children = getToc(i.children, maxDepth) + } + + toc.push(tocItem) + }) + + return toc +} + +function getTocJSX(toc: ToCItem[]): any[] { + return toc.map((item) => { + const itemData = { + type: "ObjectExpression", + properties: [ + { + type: "Property", + key: { type: "Identifier", name: "title" }, + value: { type: "Literal", value: item.title }, + kind: "init", + computed: false, + method: false, + shorthand: false, + }, + { + type: "Property", + key: { type: "Identifier", name: "level" }, + value: { type: "Literal", value: item.level }, + kind: "init", + computed: false, + method: false, + shorthand: false, + }, + { + type: "Property", + key: { type: "Identifier", name: "id" }, + value: { type: "Literal", value: item.id }, + kind: "init", + computed: false, + method: false, + shorthand: false, + }, + ], + } + + if (item.children && item.children.length > 0) { + itemData.properties.push({ + type: "Property", + key: { type: "Identifier", name: "children" }, + value: { + type: "ArrayExpression", + elements: getTocJSX(item.children), + }, + kind: "init", + computed: false, + method: false, + shorthand: false, + } as any) + } + + return itemData + }) +} diff --git a/www/packages/tailwind/base.tailwind.config.js b/www/packages/tailwind/base.tailwind.config.js index 26bbc8a411..a880998931 100644 --- a/www/packages/tailwind/base.tailwind.config.js +++ b/www/packages/tailwind/base.tailwind.config.js @@ -317,7 +317,7 @@ module.exports = { "inner-content-xs": "100%", "inner-content-sm": "100%", "inner-content-md": "100%", - "inner-content-lg": "640px", + "inner-content-lg": "550px", "inner-content-xl": "640px", "inner-content-xxl": "640px", "inner-content-xxxl": "640px", @@ -466,14 +466,14 @@ module.exports = { "medium-plus": [ "14px", { - lineHeight: "150%", + lineHeight: "160%", fontWeight: "500", }, ], medium: [ "14px", { - lineHeight: "150%", + lineHeight: "160%", fontWeight: "400", }, ], diff --git a/www/packages/types/src/config.ts b/www/packages/types/src/config.ts index 78961ab130..c26109247f 100644 --- a/www/packages/types/src/config.ts +++ b/www/packages/types/src/config.ts @@ -23,6 +23,10 @@ export declare type DocsConfig = { number: string releaseUrl: string hide?: boolean + bannerImage?: { + light: string + dark: string + } } reportIssueLink?: string logo: string diff --git a/www/packages/types/src/frontmatter.ts b/www/packages/types/src/frontmatter.ts index 3cf3b1e925..0b0b402850 100644 --- a/www/packages/types/src/frontmatter.ts +++ b/www/packages/types/src/frontmatter.ts @@ -15,4 +15,8 @@ export declare type FrontMatter = { )[] title?: string description?: string + products?: string[] + toc_max_depth?: number + generate_toc?: boolean + hide_content_menu?: boolean } diff --git a/www/packages/types/src/general.ts b/www/packages/types/src/general.ts index 59ca948895..52fd748bad 100644 --- a/www/packages/types/src/general.ts +++ b/www/packages/types/src/general.ts @@ -1,3 +1 @@ -export type Ref = - | React.MutableRefObject - | ((instance: T | null) => void) +export type Ref = React.RefObject | ((instance: T | null) => void) diff --git a/www/packages/types/src/remark-rehype.ts b/www/packages/types/src/remark-rehype.ts index 74ad764c63..c52de3a3bb 100644 --- a/www/packages/types/src/remark-rehype.ts +++ b/www/packages/types/src/remark-rehype.ts @@ -105,6 +105,70 @@ export interface UnistTree extends Node { children: UnistNode[] } +export interface UnistFunctionDeclarationNode extends UnistNode { + type: "FunctionDeclaration" + body: { + type: "BlockStatement" + body: UnistNode[] + } +} + +export interface UnistReturnStatementNode extends UnistNode { + type: "ReturnStatement" + argument: UnistFragmentNode | UnistCallExpressionNode | UnistJSXElementNode +} + +export interface UnistFragmentNode extends UnistNode { + type: "JSXFragment" + openingElement: { + type: "JSXOpeningFragment" + } + closingElement: { + type: "JSXClosingFragment" + } + children: UnistNode[] +} + +export interface UnistCallExpressionNode extends UnistNode { + type: "CallExpression" + arguments: UnistNode[] +} + +export interface UnistJSXElementNode extends UnistNode { + type: "JSXElement" + // TODO add correct type if necessary +} + +export interface UnistImportDeclarationNode extends UnistNode { + type: "ImportDeclaration" + source: { + type: "Literal" + value: string + } + specifiers: { + type: "ImportSpecifier" + imported: { + type: "Identifier" + name: string + } + local: { + type: "Identifier" + name: string + } + }[] +} + +export interface UnistProgram extends UnistNode { + type: "Program" + body: ( + | UnistNode + | UnistFunctionDeclarationNode + | UnistImportDeclarationNode + )[] + sourceType: "module" | "script" + comments?: UnistNode[] +} + export declare type CloudinaryConfig = { cloudName?: string flags?: string[] diff --git a/www/packages/types/src/toc.ts b/www/packages/types/src/toc.ts index 139a08b847..efa4a6f552 100644 --- a/www/packages/types/src/toc.ts +++ b/www/packages/types/src/toc.ts @@ -9,3 +9,11 @@ export type ToCItemUi = Omit & { children?: ToCItemUi[] associatedHeading: HTMLHeadingElement } + +export type Product = { + name: string + path: string + title: string + image: string + type: "commerce" +} diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/analytics.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/analytics.ts index 834aca99b1..4ab759969b 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/analytics.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/analytics.ts @@ -23,7 +23,7 @@ The Analytics Module is available starting [Medusa v2.8.3](https://github.com/me expandMembers: true, sortMembers: true, startSections: [ - `### Configure Analytics Module Provider + `## Configure Analytics Module Provider To use the Analytics Module, you need to configure it along with an Analytics Module Provider. diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/events.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/events.ts index 479d1dc11b..398003f527 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/events.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/events.ts @@ -6,6 +6,7 @@ const eventsOptions: FormattingOptionsType = { frontmatterData: { slug: "/references/events", sidebar_label: "Events Reference", + generate_toc: true, }, isEventsReference: true, reflectionTitle: { @@ -22,6 +23,7 @@ const eventsOptions: FormattingOptionsType = { frontmatterData: { slug: "/references/{{alias-slug}}/events", sidebar_label: "Events Reference", + generate_toc: true, }, }, } diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts index 6b565cb601..aca6d0cc95 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/notification.ts @@ -23,6 +23,7 @@ const notificationOptions: FormattingOptionsType = { member_declaration_title: false, reflection_typeParameters: false, }, + maxLevel: 2, startSections: [ `## Implementation Example diff --git a/www/yarn.lock b/www/yarn.lock index eab87a4f96..6bef513859 100644 --- a/www/yarn.lock +++ b/www/yarn.lock @@ -5400,6 +5400,19 @@ __metadata: languageName: node linkType: hard +"@stefanprobst/rehype-extract-toc@npm:^3.0.0": + version: 3.0.0 + resolution: "@stefanprobst/rehype-extract-toc@npm:3.0.0" + dependencies: + estree-util-is-identifier-name: ^3.0.0 + estree-util-value-to-estree: ^3.3.3 + hast-util-heading-rank: ^3.0.0 + hast-util-to-string: ^3.0.1 + unist-util-visit: ^5.0.0 + checksum: c317616d8c5d343e00671aa590a70751187f8b064502cb18298e2f59778db80f2e89d60832fdc89a3e4aa7f208ca7247e883ce4031e0372fce65df33f038bfb6 + languageName: node + linkType: hard + "@swc/counter@npm:0.1.3": version: 0.1.3 resolution: "@swc/counter@npm:0.1.3" @@ -6610,6 +6623,7 @@ __metadata: "@mdx-js/react": ^3.1.0 "@medusajs/icons": 2.8.3 "@next/mdx": 15.3.1 + "@stefanprobst/rehype-extract-toc": ^3.0.0 "@types/mdx": ^2.0.13 "@types/node": ^20 "@types/react": "npm:types-react@rc" @@ -6628,6 +6642,7 @@ __metadata: react-dom: rc rehype-mdx-code-props: ^2.0.0 rehype-slug: ^6.0.0 + remark-frontmatter: ^5.0.0 remark-rehype-plugins: "*" tags: "*" tailwind: "*" @@ -9350,6 +9365,15 @@ __metadata: languageName: node linkType: hard +"estree-util-value-to-estree@npm:^3.3.3": + version: 3.4.0 + resolution: "estree-util-value-to-estree@npm:3.4.0" + dependencies: + "@types/estree": ^1.0.0 + checksum: e90e0c784b29182a3feb471589ab3c031be3ff1ab068b2b473e9ee96467f99442f2c571b2708ee3493906af5bf1a0aa9712d9f90fb113a30d99669100235ba4f + languageName: node + linkType: hard + "estree-util-visit@npm:^1.0.0": version: 1.2.1 resolution: "estree-util-visit@npm:1.2.1" @@ -10277,6 +10301,15 @@ __metadata: languageName: node linkType: hard +"hast-util-to-string@npm:^3.0.1": + version: 3.0.1 + resolution: "hast-util-to-string@npm:3.0.1" + dependencies: + "@types/hast": ^3.0.0 + checksum: b5fa1912a6ba6131affae52a0f4394406c4c0d23c2b0307f1d69988f1030c7bb830289303e67c5ad8f674f5f23a454c1dcd492c39e45a22c1f46d3c9bce5bd0c + languageName: node + linkType: hard + "hast-util-whitespace@npm:^2.0.0": version: 2.0.1 resolution: "hast-util-whitespace@npm:2.0.1" @@ -14827,12 +14860,14 @@ __metadata: "@types/node": ^20.11.20 docs-utils: "*" rimraf: ^5.0.5 + slugify: ^1.6.6 tsconfig: "*" types: "*" typescript: ^5.3.3 unified: ^11.0.4 unist-builder: 3.0.0 unist-util-visit: 4.1.2 + vfile-matter: ^5.0.1 languageName: unknown linkType: soft @@ -15005,6 +15040,7 @@ __metadata: "@medusajs/icons": 2.8.3 "@next/bundle-analyzer": ^15.1.1 "@next/mdx": 15.3.1 + "@stefanprobst/rehype-extract-toc": ^3.0.0 "@types/mdx": ^2.0.13 "@types/node": ^20 "@types/react": "npm:types-react@rc" @@ -17213,6 +17249,7 @@ turbo@latest: "@mdx-js/react": ^3.1.0 "@medusajs/icons": 2.8.3 "@next/mdx": 15.0.4 + "@stefanprobst/rehype-extract-toc": ^3.0.0 "@types/mdx": ^2.0.13 "@types/node": ^20 "@types/react": "npm:types-react@rc" @@ -17307,6 +17344,16 @@ turbo@latest: languageName: node linkType: hard +"vfile-matter@npm:^5.0.1": + version: 5.0.1 + resolution: "vfile-matter@npm:5.0.1" + dependencies: + vfile: ^6.0.0 + yaml: ^2.0.0 + checksum: 0032ebd359e322392ee6ce513f51db8576ae56fff70a6e2eedb3a62116711e3898d5fef49e2b09d23829620b0f35899a88746af195f61e48b8ec26b5d9a50ec3 + languageName: node + linkType: hard + "vfile-message@npm:^3.0.0": version: 3.1.4 resolution: "vfile-message@npm:3.1.4"