{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "docs",
  "title": "Docs",
  "description": "Docs for a new Next.js project: every docscn component, Fumadocs MDX content in content/docs, the /docs routes and a search API.",
  "dependencies": [
    "fumadocs-core@^16.17.8",
    "fumadocs-mdx@^15.4.10",
    "lucide-react"
  ],
  "devDependencies": [
    "@types/mdx"
  ],
  "registryDependencies": [
    "@docscn/root-provider",
    "@docscn/docs-layout",
    "@docscn/docs-page",
    "@docscn/mdx",
    "@docscn/layout-shared",
    "@docscn/docs-tabs",
    "@docscn/steps",
    "@docscn/docs-accordion",
    "@docscn/files",
    "@docscn/type-table"
  ],
  "files": [
    {
      "path": "registry/base/blocks/docs/lib/source.ts",
      "content": "// Adapted from the create-fumadocs-app template (https://github.com/fuma-nama/fumadocs)\n// Copyright (c) 2023 Fuma, MIT License\nimport { loader } from \"fumadocs-core/source\";\nimport { lucideIconsPlugin } from \"fumadocs-core/source/lucide-icons\";\nimport { defineDocs } from \"fumadocs-mdx/macro\";\n\nconst docs = defineDocs({\n  dir: \"content/docs\",\n  docs: {\n    postprocess: {\n      // each page's Markdown, which the AI chat route searches\n      includeProcessedMarkdown: true,\n    },\n  },\n});\n\n// See https://fumadocs.dev/docs/headless/source-api for more info\nexport const source = loader({\n  baseUrl: \"/docs\",\n  source: docs.toFumadocsSource(),\n  plugins: [lucideIconsPlugin()],\n});\n",
      "type": "registry:lib",
      "target": "lib/source.ts"
    },
    {
      "path": "registry/base/blocks/docs/lib/layout.shared.tsx",
      "content": "// Adapted from the create-fumadocs-app template (https://github.com/fuma-nama/fumadocs)\n// Copyright (c) 2023 Fuma, MIT License\nimport type { BaseLayoutProps } from \"@/registry/base/docs/layouts/shared\";\n\nexport function baseOptions(): BaseLayoutProps {\n  return {\n    nav: {\n      // JSX supported\n      title: \"My App\",\n    },\n  };\n}\n",
      "type": "registry:lib",
      "target": "lib/layout.shared.tsx"
    },
    {
      "path": "registry/base/blocks/docs/components/mdx.tsx",
      "content": "// Adapted from the create-fumadocs-app template (https://github.com/fuma-nama/fumadocs)\n// Copyright (c) 2023 Fuma, MIT License\nimport type { MDXComponents } from \"mdx/types\";\nimport { Accordion, Accordions } from \"@/components/docs/components/accordion\";\nimport { File, Files, Folder } from \"@/components/docs/components/files\";\nimport { Step, Steps } from \"@/components/docs/components/steps\";\nimport { Tab, Tabs } from \"@/components/docs/components/tabs\";\nimport { TypeTable } from \"@/components/docs/components/type-table\";\nimport defaultMdxComponents from \"@/registry/base/docs/mdx\";\n\nexport function getMDXComponents(components?: MDXComponents) {\n  return {\n    ...defaultMdxComponents,\n    Tabs,\n    Tab,\n    Steps,\n    Step,\n    Accordions,\n    Accordion,\n    Files,\n    Folder,\n    File,\n    TypeTable,\n    ...components,\n  } satisfies MDXComponents;\n}\n\nexport const useMDXComponents = getMDXComponents;\n\ndeclare global {\n  type MDXProvidedComponents = ReturnType<typeof getMDXComponents>;\n}\n",
      "type": "registry:component",
      "target": "components/mdx.tsx"
    },
    {
      "path": "registry/base/blocks/docs/app/docs/layout.tsx",
      "content": "// Adapted from the create-fumadocs-app template (https://github.com/fuma-nama/fumadocs)\n// Copyright (c) 2023 Fuma, MIT License\nimport { baseOptions } from \"@/lib/layout.shared\";\nimport { source } from \"@/lib/source\";\nimport { DocsLayout } from \"@/registry/base/docs/layouts/docs\";\n\nexport default function Layout({ children }: LayoutProps<\"/docs\">) {\n  return (\n    <DocsLayout tree={source.getPageTree()} {...baseOptions()}>\n      {children}\n    </DocsLayout>\n  );\n}\n",
      "type": "registry:page",
      "target": "app/docs/layout.tsx"
    },
    {
      "path": "registry/base/blocks/docs/app/docs/[[...slug]]/page.tsx",
      "content": "// Adapted from the create-fumadocs-app template (https://github.com/fuma-nama/fumadocs)\n// Copyright (c) 2023 Fuma, MIT License\nimport type { Metadata } from \"next\";\nimport { notFound } from \"next/navigation\";\nimport { getMDXComponents } from \"@/components/mdx\";\nimport { source } from \"@/lib/source\";\nimport {\n  DocsBody,\n  DocsDescription,\n  DocsPage,\n  DocsTitle,\n} from \"@/registry/base/docs/layouts/docs/page\";\nimport { createRelativeLink } from \"@/registry/base/docs/mdx\";\n\nexport default async function Page(props: PageProps<\"/docs/[[...slug]]\">) {\n  const params = await props.params;\n  const page = source.getPage(params.slug);\n  if (!page) notFound();\n\n  const MDX = page.data.body;\n\n  return (\n    <DocsPage toc={page.data.toc} full={page.data.full}>\n      <DocsTitle>{page.data.title}</DocsTitle>\n      <DocsDescription>{page.data.description}</DocsDescription>\n      <DocsBody>\n        <MDX\n          components={getMDXComponents({\n            // this allows you to link to other pages with relative file paths\n            a: createRelativeLink(source, page),\n          })}\n        />\n      </DocsBody>\n    </DocsPage>\n  );\n}\n\nexport function generateStaticParams() {\n  return source.generateParams();\n}\n\nexport async function generateMetadata(\n  props: PageProps<\"/docs/[[...slug]]\">,\n): Promise<Metadata> {\n  const params = await props.params;\n  const page = source.getPage(params.slug);\n  if (!page) notFound();\n\n  return {\n    title: page.data.title,\n    description: page.data.description,\n  };\n}\n",
      "type": "registry:page",
      "target": "app/docs/[[...slug]]/page.tsx"
    },
    {
      "path": "registry/base/blocks/docs/app/api/search/route.ts",
      "content": "// Adapted from the create-fumadocs-app template (https://github.com/fuma-nama/fumadocs)\n// Copyright (c) 2023 Fuma, MIT License\nimport { createFromSource } from \"fumadocs-core/search/server\";\nimport { source } from \"@/lib/source\";\n\nexport const { GET } = createFromSource(source);\n",
      "type": "registry:page",
      "target": "app/api/search/route.ts"
    },
    {
      "path": "registry/base/blocks/docs/content/docs/index.mdx",
      "content": "---\ntitle: Hello World\ndescription: Your first document\n---\n\nWelcome to the docs! You can start writing documents in `content/docs`.\n\n## What is Next?\n\n<Cards>\n  <Card title=\"Fumadocs\" href=\"https://fumadocs.dev/docs\" />\n  <Card title=\"docscn\" href=\"https://docscn.dev/docs\" />\n</Cards>\n",
      "type": "registry:file",
      "target": "~/content/docs/index.mdx"
    },
    {
      "path": "registry/base/blocks/docs/content/docs/meta.json",
      "content": "{\n  \"pages\": [\"index\"]\n}\n",
      "type": "registry:file",
      "target": "~/content/docs/meta.json"
    }
  ],
  "docs": "Finish the setup with two edits. 1) In app/layout.tsx, import { RootProvider } from \"@/components/docs/provider/next\" and wrap {children} in <RootProvider>. RootProvider includes next-themes, so it replaces the ThemeProvider from shadcn/ui's template or dark mode guide. Keep suppressHydrationWarning on <html>. 2) In next.config.ts, import { createMDX } from \"fumadocs-mdx/next\" and change the export to export default createMDX()(nextConfig). Then start the dev server and open /docs. See https://docscn.dev/docs/getting-started.",
  "type": "registry:block"
}