docs: add routing page (#9550)
- Add a new homepage to `book` project for the routing page - Move all main doc pages to be under `/v2/learn` (and added redirects + fixed links across docs) - Other: add admin components to resources dropdown + fixes to search on mobile. Closes DX-955 Preview: https://docs-v2-git-docs-router-page-medusajs.vercel.app/v2
This commit is contained in:
1 parent
7a47f5211d
commit
0a37675f0e
223 files changed
+2549
-696
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
import "./globals.css"
|
import "./globals.css"
|
||||||
import Providers from "../providers"
|
import Providers from "../providers"
|
||||||
import { WideLayout } from "docs-ui"
|
import { BareboneLayout, WideLayout } from "docs-ui"
|
||||||
import { Inter, Roboto_Mono } from "next/font/google"
|
import { Inter, Roboto_Mono } from "next/font/google"
|
||||||
import clsx from "clsx"
|
import clsx from "clsx"
|
||||||
|
|
||||||
@@ -26,17 +26,18 @@ export default function RootLayout({
|
|||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<WideLayout
|
<BareboneLayout htmlClassName={clsx(inter.variable, robotoMono.variable)}>
|
||||||
ProvidersComponent={Providers}
|
<WideLayout
|
||||||
sidebarProps={{
|
sidebarProps={{
|
||||||
expandItems: false,
|
expandItems: false,
|
||||||
}}
|
}}
|
||||||
bodyClassName={clsx(inter.variable, robotoMono.variable)}
|
showToc={false}
|
||||||
showToc={false}
|
showBanner={false}
|
||||||
showBanner={false}
|
showBreadcrumbs={false}
|
||||||
showBreadcrumbs={false}
|
ProvidersComponent={Providers}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</WideLayout>
|
</WideLayout>
|
||||||
|
</BareboneLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -9,11 +9,7 @@ const DownloadFull = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Button variant="secondary">
|
<Button variant="secondary">
|
||||||
<Link
|
<Link href={`/api/download/${area}`} download target="_blank">
|
||||||
href={`${process.env.NEXT_PUBLIC_BASE_PATH}/download/${area}`}
|
|
||||||
download
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
Download OpenApi Specs Collection
|
Download OpenApi Specs Collection
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
File renamed without changes.
@@ -0,0 +1,12 @@
|
|||||||
|
import { Inter, Roboto_Mono } from "next/font/google"
|
||||||
|
|
||||||
|
export const inter = Inter({
|
||||||
|
subsets: ["latin"],
|
||||||
|
variable: "--font-inter",
|
||||||
|
weight: ["400", "500"],
|
||||||
|
})
|
||||||
|
|
||||||
|
export const robotoMono = Roboto_Mono({
|
||||||
|
subsets: ["latin"],
|
||||||
|
variable: "--font-roboto-mono",
|
||||||
|
})
|
||||||
@@ -16,10 +16,14 @@
|
|||||||
@apply bg-medusa-bg-highlight;
|
@apply bg-medusa-bg-highlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
*:not(.code-block-elm) {
|
||||||
scrollbar-color: var(--docs-border-base) var(--docs-bg-base);
|
scrollbar-color: var(--docs-border-base) var(--docs-bg-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.code-block-elm {
|
||||||
|
scrollbar-color: var(--docs-contrast-border-base) transparent;
|
||||||
|
}
|
||||||
|
|
||||||
aside * {
|
aside * {
|
||||||
scrollbar-color: var(--docs-border-base) var(--docs-bg-subtle);
|
scrollbar-color: var(--docs-border-base) var(--docs-bg-subtle);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import type { Metadata } from "next"
|
import type { Metadata } from "next"
|
||||||
import { Inter, Roboto_Mono } from "next/font/google"
|
|
||||||
import Providers from "@/providers"
|
|
||||||
import "./globals.css"
|
import "./globals.css"
|
||||||
import { TightLayout } from "docs-ui"
|
|
||||||
import { config } from "@/config"
|
import { config } from "@/config"
|
||||||
|
import { BareboneLayout } from "docs-ui"
|
||||||
|
import { inter, robotoMono } from "./fonts"
|
||||||
import clsx from "clsx"
|
import clsx from "clsx"
|
||||||
import Feedback from "@/components/Feedback"
|
|
||||||
import EditButton from "@/components/EditButton"
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: {
|
title: {
|
||||||
@@ -19,34 +16,14 @@ export const metadata: Metadata = {
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
export const inter = Inter({
|
|
||||||
subsets: ["latin"],
|
|
||||||
variable: "--font-inter",
|
|
||||||
weight: ["400", "500"],
|
|
||||||
})
|
|
||||||
|
|
||||||
export const robotoMono = Roboto_Mono({
|
|
||||||
subsets: ["latin"],
|
|
||||||
variable: "--font-roboto-mono",
|
|
||||||
})
|
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TightLayout
|
<BareboneLayout htmlClassName={clsx(inter.variable, robotoMono.variable)}>
|
||||||
ProvidersComponent={Providers}
|
|
||||||
sidebarProps={{
|
|
||||||
expandItems: true,
|
|
||||||
}}
|
|
||||||
showPagination={true}
|
|
||||||
bodyClassName={clsx(inter.variable, robotoMono.variable)}
|
|
||||||
feedbackComponent={<Feedback className="my-2" />}
|
|
||||||
editComponent={<EditButton />}
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</TightLayout>
|
</BareboneLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 223 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user