chore(docs): use unified @hanzo/docs package

Consolidate to single @hanzo/docs package with subpath exports:
- @hanzo/docs/core/* for core functionality
- @hanzo/docs/ui/* for UI components
- @hanzo/docs/mdx/* for MDX processing

Uses hanzo-docs CLI instead of fumadocs-mdx for build commands.
This commit is contained in:
2025-12-17 14:22:35 -08:00
parent 640bfbc2b6
commit 3d42bc3de2
8 changed files with 17 additions and 19 deletions
+2 -2
View File
@@ -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/docs/ui/page"
import { notFound } from "next/navigation"
import defaultMdxComponents from "@hanzo/docs-ui/mdx"
import defaultMdxComponents from "@hanzo/docs/ui/mdx"
export default async function Page(props: {
params: Promise<{ slug?: string[] }>
+1 -1
View File
@@ -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/docs/ui/layouts/docs"
export default async function Layout({ children }: { children: ReactNode }) {
return (
+1 -1
View File
@@ -1,5 +1,5 @@
import "./global.css"
import { RootProvider } from "@hanzo/docs-ui/provider/next"
import { RootProvider } from "@hanzo/docs/ui/provider/next"
import { Inter } from "next/font/google"
import type { ReactNode } from "react"
+1 -1
View File
@@ -1,5 +1,5 @@
import { docs } from "@/.source"
import { loader } from "@hanzo/docs-core/source"
import { loader } from "@hanzo/docs/core/source"
// Create a single source instance that is reused
// This prevents circular references and stack overflow issues
+7 -7
View File
@@ -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/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"
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
+1 -1
View File
@@ -1,4 +1,4 @@
import { createMDX } from "@hanzo/docs-mdx/next"
import { createMDX } from "@hanzo/docs/mdx/next"
/** @type {import('next').NextConfig} */
const config = {
+3 -5
View File
@@ -4,16 +4,14 @@
"private": true,
"scripts": {
"dev": "next dev --port 3001",
"build": "fumadocs-mdx && next build",
"build": "hanzo-docs && next build",
"export": "TURBOPACK=0 next build",
"start": "next start",
"lint": "next lint",
"postinstall": "fumadocs-mdx"
"postinstall": "hanzo-docs"
},
"dependencies": {
"@hanzo/docs-core": "^16.2.5",
"@hanzo/docs-mdx": "^14.1.0",
"@hanzo/docs-ui": "^16.2.5",
"@hanzo/docs": "^16.2.5",
"lucide-react": "^0.468.0",
"next": "16.0.1",
"next-themes": "^0.4.6",
+1 -1
View File
@@ -1,7 +1,7 @@
import {
defineConfig,
defineDocs,
} from "@hanzo/docs-mdx/config"
} from "@hanzo/docs/mdx/config"
import rehypePrettyCode from "rehype-pretty-code"
export default defineConfig({