docs: update docusaurus to v3 (#5625)

* update dependencies

* update onboarding mdx

* fixes for mdx issues

* fixes for mdx compatibility

* resolve mdx errors

* fixes in reference

* fix check errors

* revert change in vale action

* fix node version in action

* fix summary in markdown
This commit is contained in:
Shahed Nasser
2023-11-13 20:11:50 +02:00
committed by GitHub
parent cedab58339
commit c6dff873de
2265 changed files with 46163 additions and 47195 deletions
@@ -6,7 +6,7 @@ import Heading from "@theme/Heading"
import MDXContent from "@theme/MDXContent"
import type { Props } from "@theme/DocItem/Content"
import { DocContextValue } from "@medusajs/docs"
import { Badge, type BadgeVariant } from "docs-ui"
import { Badge, BadgeVariant } from "docs-ui"
/**
Title can be declared inside md content or declared through
@@ -33,7 +33,6 @@ export default function DocItemContent({ children }: Props): JSX.Element {
frontMatter: { badge },
} = useDoc() as DocContextValue
const syntheticTitle = useSyntheticTitle()
return (
<div className={clsx(ThemeClassNames.docs.docMarkdown, "markdown")}>
{syntheticTitle && (
@@ -4,15 +4,14 @@ import type FooterType from "@theme/DocItem/Footer"
import type { WrapperProps } from "@docusaurus/types"
import { useDoc } from "@docusaurus/theme-common/internal"
import { useThemeConfig } from "@docusaurus/theme-common"
import { ThemeConfig } from "@medusajs/docs"
import Feedback from "@site/src/components/Feedback"
import type { ThemeConfig } from "@medusajs/docs"
import Feedback from "../../../components/Feedback"
type Props = WrapperProps<typeof FooterType>
export default function FooterWrapper(props: Props): JSX.Element {
const { metadata } = useDoc()
const { footerFeedback = { event: "" } } = useThemeConfig() as ThemeConfig
return (
<>
{!metadata.frontMatter?.hide_footer && (
@@ -10,9 +10,10 @@ import DocItemTOCMobile from "@theme/DocItem/TOC/Mobile"
import DocItemTOCDesktop from "@theme/DocItem/TOC/Desktop"
import DocItemContent from "@theme/DocItem/Content"
import DocBreadcrumbs from "@theme/DocBreadcrumbs"
import Unlisted from "@theme/Unlisted"
import type { Props } from "@theme/DocItem/Layout"
import Footer from "@theme/Footer"
import { useSidebar } from "../../../providers/Sidebar"
import Footer from "@theme/Footer"
/**
* Decide if the toc should be rendered, on mobile or desktop viewports
@@ -40,6 +41,9 @@ function useDocTOC() {
export default function DocItemLayout({ children }: Props): JSX.Element {
const docTOC = useDocTOC()
const {
metadata: { unlisted },
} = useDoc()
const sidebarContext = useSidebar()
return (
<div className="row m-0">
@@ -51,6 +55,7 @@ export default function DocItemLayout({ children }: Props): JSX.Element {
!sidebarContext?.hiddenSidebarContainer && "!max-w-[720px]"
)}
>
{unlisted && <Unlisted />}
<DocVersionBanner />
<div>
<article className={clsx("[&>*:first-child]:mt-0")}>