docs: add support for keywords in references (#12413)

This commit is contained in:
Shahed Nasser
2025-05-08 16:40:17 +03:00
committed by GitHub
parent 42bc2a1372
commit 0af6e1f212
18 changed files with 51 additions and 3 deletions
@@ -1,4 +1,5 @@
import { MDXRemote } from "next-mdx-remote/rsc"
import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote/rsc"
import { serialize } from "next-mdx-remote/serialize"
import path from "path"
import { promises as fs } from "fs"
import { notFound } from "next/navigation"
@@ -93,6 +94,7 @@ export async function generateMetadata({
}
metadata.title = pageTitleMatch.groups.title
metadata.keywords = (fileData.source.frontmatter?.keywords || []) as string[]
return metadata
}
@@ -103,6 +105,7 @@ const loadFile = cache(
): Promise<
| {
content: string
source: MDXRemoteSerializeResult
path: string
}
| undefined
@@ -120,8 +123,14 @@ const loadFile = cache(
return undefined
}
const fullPath = path.join(monoRepoPath, fileDetails.filePath)
const fileContent = await fs.readFile(fullPath, "utf-8")
const serialized = await serialize(fileContent, {
parseFrontmatter: true,
})
return {
content: await fs.readFile(fullPath, "utf-8"),
content: fileContent,
source: serialized,
path: fullPath,
}
}
@@ -5,6 +5,10 @@ tags:
- server
- how to
sidebar_label: Create Auth Provider
keywords:
- auth
- provider
- integration
---
import { TypeList } from "docs-ui"
@@ -521,7 +525,7 @@ module.exports = defineConfig({
## 5. Test it Out
To test out your Authentication Module Provider, use any of the [Authentication Routes](https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route), using your provider's ID as a path parameter.
To test out your Authentication Module Provider, use any of the [Authentication Routes](https://docs.medusajs.com/resources/commerce-modules/auth/authentication-route), using your provider's ID as a path parameter.
For example, to get a registration token for an admin user, send a `POST` request to `/auth/user/my-auth/register` replacing `my-auth` with your Authentication Module Provider's ID:
@@ -5,6 +5,10 @@ tags:
- server
- how to
sidebar_label: Use Cache Module
keywords:
- cache
- provider
- integration
---
import { TypeList } from "docs-ui"
@@ -5,6 +5,10 @@ tags:
- server
- how to
sidebar_label: Use Event Module
keywords:
- event
- provider
- integration
---
import { TypeList } from "docs-ui"
@@ -1,5 +1,10 @@
---
slug: /references/file-provider-module
keywords:
- file
- storage
- provider
- integration
---
import { TypeList } from "docs-ui"
@@ -5,6 +5,10 @@ tags:
- server
- how to
sidebar_label: Create Locking Provider
keywords:
- locking
- provider
- integration
---
import { TypeList } from "docs-ui"
@@ -5,6 +5,10 @@ tags:
- server
- how to
sidebar_label: Use Notification Module
keywords:
- notification
- provider
- integration
---
import { TypeList } from "docs-ui"
@@ -5,6 +5,10 @@ tags:
- server
- how to
sidebar_label: Create Tax Provider
keywords:
- tax
- provider
- integration
---
import { TypeList } from "docs-ui"