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:
Shahed Nasser
2024-10-18 11:24:34 +03:00
committed by GitHub
parent 7a47f5211d
commit 0a37675f0e
223 changed files with 2549 additions and 696 deletions
+14 -13
View File
@@ -1,6 +1,6 @@
import "./globals.css"
import Providers from "../providers"
import { WideLayout } from "docs-ui"
import { BareboneLayout, WideLayout } from "docs-ui"
import { Inter, Roboto_Mono } from "next/font/google"
import clsx from "clsx"
@@ -26,17 +26,18 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
<WideLayout
ProvidersComponent={Providers}
sidebarProps={{
expandItems: false,
}}
bodyClassName={clsx(inter.variable, robotoMono.variable)}
showToc={false}
showBanner={false}
showBreadcrumbs={false}
>
{children}
</WideLayout>
<BareboneLayout htmlClassName={clsx(inter.variable, robotoMono.variable)}>
<WideLayout
sidebarProps={{
expandItems: false,
}}
showToc={false}
showBanner={false}
showBreadcrumbs={false}
ProvidersComponent={Providers}
>
{children}
</WideLayout>
</BareboneLayout>
)
}
@@ -9,11 +9,7 @@ const DownloadFull = () => {
return (
<Button variant="secondary">
<Link
href={`${process.env.NEXT_PUBLIC_BASE_PATH}/download/${area}`}
download
target="_blank"
>
<Link href={`/api/download/${area}`} download target="_blank">
Download OpenApi Specs Collection
</Link>
</Button>