docs: add JSON-LD schemas to docs (#14007)

This commit is contained in:
Shahed Nasser
2025-11-07 14:43:50 +02:00
committed by GitHub
parent c9648cc9cc
commit dc6f253d31
26 changed files with 146 additions and 17 deletions
+1 -1
View File
@@ -41,7 +41,7 @@
}
*::selection {
@apply bg-medusa-bg-highlight;
@apply bg-medusa-fg-subtle text-medusa-fg-on-inverted;
}
* {
+3 -2
View File
@@ -4,13 +4,14 @@ import { BareboneLayout, WideLayout } from "docs-ui"
import clsx from "clsx"
import { Metadata } from "next"
import { inter, robotoMono } from "./fonts"
import { config } from "@/config"
const ogImage =
"https://res.cloudinary.com/dza7lstvk/image/upload/v1732200992/Medusa%20Resources/opengraph-image_daq6nx.jpg"
export const metadata: Metadata = {
title: "Medusa API Reference",
description: "Check out Medusa's API reference",
title: `%s - ${config.titleSuffix}`,
description: config.description,
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
+3
View File
@@ -5,6 +5,9 @@ const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
...globalConfig,
titleSuffix: "Medusa API Reference",
description:
"Comprehensive reference for Medusa's API routes, request/response structures, authentication methods, and error handling.",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
// sidebar is auto generated
+1 -1
View File
@@ -14,7 +14,7 @@
}
*::selection {
@apply bg-medusa-bg-highlight;
@apply bg-medusa-fg-subtle text-medusa-fg-on-inverted;
}
*:not(.code-block-elm) {
+1 -1
View File
@@ -13,7 +13,7 @@ export const metadata: Metadata = {
template: `%s - ${config.titleSuffix}`,
default: config.titleSuffix || "",
},
description: "Explore and learn how to use Medusa.",
description: config.description,
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
+2
View File
@@ -8,6 +8,8 @@ const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
...globalConfig,
titleSuffix: "Medusa Documentation",
description:
"Explore and learn how to use Medusa. Learn how to get started, the fundamental concepts, how to customize Medusa, and more.",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebars: generatedSidebars as Sidebar.Sidebar[],
+1 -1
View File
@@ -14,7 +14,7 @@
}
*::selection {
@apply bg-medusa-bg-highlight;
@apply bg-medusa-fg-subtle text-medusa-fg-on-inverted;
}
*:not(.code-block-elm) {
+1 -2
View File
@@ -15,8 +15,7 @@ export const metadata: Metadata = {
template: `%s - ${config.titleSuffix}`,
default: config.titleSuffix || "",
},
description:
"Learn about Cloud, Medusa's PaaS offering for scalable deployments.",
description: config.description,
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
+2
View File
@@ -8,6 +8,8 @@ const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
...globalConfig,
titleSuffix: "Medusa Cloud Documentation",
description:
"Learn about Cloud, Medusa's PaaS offering for scalable deployments. Learn how to sign up, deploy, and manage your Medusa Cloud projects.",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebars: generatedSidebars as Sidebar.Sidebar[],
+1 -1
View File
@@ -20,7 +20,7 @@
}
*::selection {
@apply bg-medusa-bg-highlight;
@apply bg-medusa-fg-subtle text-medusa-fg-on-inverted;
}
* {
+1 -2
View File
@@ -15,8 +15,7 @@ export const metadata: Metadata = {
template: `%s - ${config.titleSuffix}`,
default: config.titleSuffix || "",
},
description:
"Explore Medusa's recipes, API references, configurations, storefront guides, and more.",
description: config.description,
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
+2
View File
@@ -7,6 +7,8 @@ const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
...globalConfig,
titleSuffix: "Medusa Documentation",
description:
"Explore Medusa's recipes, Commerce and Infrastructure modules, API and SDK references, storefront guides, how-to guides, tutorials, and more.",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebars: [],
+1 -1
View File
@@ -14,7 +14,7 @@
}
*::selection {
@apply bg-medusa-bg-highlight;
@apply bg-medusa-fg-subtle text-medusa-fg-on-inverted;
}
*:not(.code-block-elm) {
+1 -2
View File
@@ -15,8 +15,7 @@ export const metadata: Metadata = {
template: `%s - ${config.titleSuffix}`,
default: config.titleSuffix || "",
},
description:
"Learn about Medusa UI, A React package with primitives for building Medusa applications.",
description: config.description,
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
+2
View File
@@ -7,6 +7,8 @@ const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
...globalConfig,
titleSuffix: "Medusa UI",
description:
"Learn about Medusa UI, A React package with primitives for building Medusa applications. Explore components, hooks, colors, icons, and more.",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebars: generatedSidebars as Sidebar.Sidebar[],
+1 -1
View File
@@ -14,7 +14,7 @@
}
*::selection {
@apply bg-medusa-bg-highlight;
@apply bg-medusa-fg-subtle text-medusa-fg-on-inverted;
}
*:not(.code-block-elm) {
+1 -1
View File
@@ -15,7 +15,7 @@ export const metadata: Metadata = {
template: `%s - ${config.titleSuffix}`,
default: config.titleSuffix || "",
},
description: "Explore and learn how to use the Medusa Admin.",
description: config.description,
metadataBase: new URL(
process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
),
+2
View File
@@ -8,6 +8,8 @@ const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
export const config: DocsConfig = {
...globalConfig,
titleSuffix: "Medusa Admin User Guide",
description:
"Explore and learn how to use the Medusa Admin. Learn how to manage products, orders, customers, and more within the Medusa Admin dashboard.",
baseUrl,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
sidebars: generatedSidebars as Sidebar.Sidebar[],