docs: support detecting broken link cross-projects (#10483)

* docs: support detecting broken link cross-projects

* remove double separators
This commit is contained in:
Shahed Nasser
2024-12-06 19:54:46 +02:00
committed by GitHub
parent a76b533604
commit e7e36f39fb
28 changed files with 492 additions and 166 deletions
@@ -288,6 +288,6 @@ You can now execute this workflow in a custom API route, scheduled job, or subsc
<Note title="Tip">
Find a full list of the registered resources in the Medusa container and their registration key in [this reference](!resources!/resources/medusa-container-resources). You can use these resources in your custom workflows.
Find a full list of the registered resources in the Medusa container and their registration key in [this reference](!resources!/medusa-container-resources). You can use these resources in your custom workflows.
</Note>
@@ -6,7 +6,7 @@ export const metadata = {
# {metadata.title}
In the previous chapters, you [defined a link](../define-link/page.mdx) between the [custom Brand Module](../../custom-features/module/page.mdx) and Medusa's [Product Module](!resources!/comerce-modules/product), then [extended the create-product flow](../extend-create-product/page.mdx) to link a product to a brand.
In the previous chapters, you [defined a link](../define-link/page.mdx) between the [custom Brand Module](../../custom-features/module/page.mdx) and Medusa's [Product Module](!resources!/commerce-modules/product), then [extended the create-product flow](../extend-create-product/page.mdx) to link a product to a brand.
In this chapter, you'll learn how to retrieve a product's brand (and vice-versa) in two ways: Using Medusa's existing API route, or in customizations, such as a custom API route.
+16 -1
View File
@@ -9,11 +9,27 @@ import {
crossProjectLinksPlugin,
} from "remark-rehype-plugins"
import { sidebar } from "./sidebar.mjs"
import path from "path"
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
rehypePlugins: [
[
brokenLinkCheckerPlugin,
{
crossProjects: {
resources: {
projectPath: path.resolve("..", "resources"),
hasGeneratedSlugs: true,
},
ui: {
projectPath: path.resolve("..", "ui"),
contentPath: "src/content/docs",
},
},
},
],
[
crossProjectLinksPlugin,
{
@@ -37,7 +53,6 @@ const withMDX = mdx({
process.env.VERCEL_ENV === "production",
},
],
[brokenLinkCheckerPlugin],
[localLinksRehypePlugin],
[
rehypeMdxCodeProps,