mirror of
https://github.com/luxfi/dex.git
synced 2026-09-24 00:26:31 +00:00
chore(docs): migrate from fumadocs to @hanzo/mdx and @hanzo/ui
- Replace fumadocs-ui with @hanzo/ui/docs/* - Replace fumadocs-mdx with @hanzo/mdx - Update import paths and CLI commands
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { source } from "@/lib/source"
|
||||
import type { Metadata } from "next"
|
||||
import { DocsPage, DocsBody, DocsTitle, DocsDescription } from "@hanzo/docs/ui/page"
|
||||
import { DocsPage, DocsBody, DocsTitle, DocsDescription } from "@hanzo/ui/docs/page"
|
||||
import { notFound } from "next/navigation"
|
||||
import defaultMdxComponents from "@hanzo/docs/ui/mdx"
|
||||
import defaultMdxComponents from "@hanzo/ui/docs/mdx"
|
||||
|
||||
export default async function Page(props: {
|
||||
params: Promise<{ slug?: string[] }>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { source } from "@/lib/source"
|
||||
import type { ReactNode } from "react"
|
||||
import { DocsLayout } from "@hanzo/docs/ui/layouts/docs"
|
||||
import { DocsLayout } from "@hanzo/ui/docs/layouts/docs"
|
||||
|
||||
export default async function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import "./global.css"
|
||||
import { RootProvider } from "@hanzo/docs/ui/provider/next"
|
||||
import { RootProvider } from "@hanzo/ui/docs/provider/next"
|
||||
import { Inter } from "next/font/google"
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { docs } from "@/.source"
|
||||
import { loader } from "@hanzo/docs/core/source"
|
||||
import { loader } from "@hanzo/ui/docs/source"
|
||||
|
||||
// Create a single source instance that is reused
|
||||
// This prevents circular references and stack overflow issues
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { MDXComponents } from "mdx/types"
|
||||
import defaultMdxComponents from "@hanzo/docs/ui/mdx"
|
||||
import { Tab, Tabs } from "@hanzo/docs/ui/components/tabs"
|
||||
import { Card, Cards } from "@hanzo/docs/ui/components/card"
|
||||
import { Step, Steps } from "@hanzo/docs/ui/components/steps"
|
||||
import { Callout } from "@hanzo/docs/ui/components/callout"
|
||||
import { Accordion, Accordions } from "@hanzo/docs/ui/components/accordion"
|
||||
import { TypeTable } from "@hanzo/docs/ui/components/type-table"
|
||||
import defaultMdxComponents from "@hanzo/ui/docs/mdx"
|
||||
import { Tab, Tabs } from "@hanzo/ui/docs/components/tabs"
|
||||
import { Card, Cards } from "@hanzo/ui/docs/components/card"
|
||||
import { Step, Steps } from "@hanzo/ui/docs/components/steps"
|
||||
import { Callout } from "@hanzo/ui/docs/components/callout"
|
||||
import { Accordion, Accordions } from "@hanzo/ui/docs/components/accordion"
|
||||
import { TypeTable } from "@hanzo/ui/docs/components/type-table"
|
||||
|
||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
return {
|
||||
|
||||
+4
-3
@@ -4,14 +4,15 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --port 3001",
|
||||
"build": "hanzo-docs && next build",
|
||||
"build": "hanzo-mdx && next build",
|
||||
"export": "TURBOPACK=0 next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"postinstall": "hanzo-docs"
|
||||
"postinstall": "hanzo-mdx"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hanzo/docs": "^16.2.5",
|
||||
"@hanzo/mdx": "^14.1.0",
|
||||
"@hanzo/ui": "^5.3.22",
|
||||
"lucide-react": "^0.468.0",
|
||||
"next": "16.0.1",
|
||||
"next-themes": "^0.4.6",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
defineConfig,
|
||||
defineDocs,
|
||||
} from "@hanzo/docs/mdx/config"
|
||||
} from "@hanzo/mdx/config"
|
||||
import rehypePrettyCode from "rehype-pretty-code"
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
Reference in New Issue
Block a user