docs: restructure api-reference to allow base path (#7954)

This commit is contained in:
Shahed Nasser
2024-07-04 19:12:02 +03:00
committed by GitHub
parent 94e5feeb3d
commit 92dd855290
16 changed files with 99 additions and 80 deletions

View File

@@ -0,0 +1,42 @@
import AreaProvider from "@/providers/area"
import AdminContentV2 from "../_mdx/admin.mdx"
import ClientLibrariesV2 from "../_mdx/client-libraries.mdx"
import Section from "@/components/Section"
import Tags from "@/components/Tags"
import DividedLayout from "@/layouts/Divided"
import PageTitleProvider from "@/providers/page-title"
const ReferencePage = async () => {
return (
<AreaProvider area={"admin"}>
<PageTitleProvider>
<h1 className="!text-h2 block lg:hidden">
Medusa V2 Admin API Reference
</h1>
<DividedLayout
mainContent={
<Section>
<h1 className="!text-h2 hidden lg:block">
Medusa V2 Admin API Reference
</h1>
<AdminContentV2 />
</Section>
}
codeContent={<ClientLibrariesV2 />}
className="flex-col-reverse"
/>
<Tags />
</PageTitleProvider>
</AreaProvider>
)
}
export default ReferencePage
export function generateMetadata() {
return {
title: `Medusa Admin API Reference`,
description: `REST API reference for the Medusa admin API. This reference includes code snippets and examples for Medusa JS Client and cURL.`,
metadataBase: process.env.NEXT_PUBLIC_BASE_URL,
}
}