mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Refactor: Rename to @fuma-docs/*
This commit is contained in:
@@ -3,7 +3,12 @@
|
||||
"changelog": "@changesets/cli/changelog",
|
||||
"commit": false,
|
||||
"fixed": [
|
||||
["next-docs-zeta", "next-docs-ui", "next-docs-mdx", "create-next-docs-app"]
|
||||
[
|
||||
"@fuma-docs/core",
|
||||
"@fuma-docs/ui",
|
||||
"@fuma-docs/mdx",
|
||||
"create-fuma-docs-app"
|
||||
]
|
||||
],
|
||||
"linked": [],
|
||||
"access": "restricted",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
'@fuma-docs/core': major
|
||||
'create-fuma-docs-app': major
|
||||
'@fuma-docs/mdx': major
|
||||
'@fuma-docs/ui': major
|
||||
---
|
||||
|
||||
**Rename to `@fuma-docs/*`**
|
||||
|
||||
`next-docs-zeta` -> `@fuma-docs/core`
|
||||
|
||||
`next-docs-ui` -> `@fuma-docs/ui`
|
||||
|
||||
`next-docs-mdx` -> `@fuma-docs/mdx`
|
||||
|
||||
`create-next-docs-app` -> `create-fuma-docs-app`
|
||||
@@ -5,7 +5,6 @@ node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# next-docs-mdx
|
||||
.map.ts
|
||||
|
||||
# testing
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The framework for building documentation websites in Next.js.
|
||||
|
||||
📘 Learn More: [Documentation](https://next-docs-zeta.vercel.app)
|
||||
📘 Learn More: [Documentation](https://fuma-docs.vercel.app)
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Layout } from 'next-docs-ui/layout';
|
||||
import { Layout } from '@fuma-docs/ui/layout';
|
||||
import type { ReactNode } from 'react';
|
||||
import { layoutOptions } from '../docs/layout';
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ export function Previews(): JSX.Element {
|
||||
}
|
||||
|
||||
export function CreateAppAnimation(): JSX.Element {
|
||||
const installCmd = 'npm create next-docs-app';
|
||||
const installCmd = 'npm create fuma-docs-app';
|
||||
const tickTime = 100;
|
||||
const timeCommandEnter = installCmd.length;
|
||||
const timeCommandRun = timeCommandEnter + 3;
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
StarsIcon,
|
||||
TimerIcon,
|
||||
} from 'lucide-react';
|
||||
import { File, Files } from 'next-docs-ui/components/files';
|
||||
import { File, Files } from '@fuma-docs/ui/components/files';
|
||||
import Link from 'next/link';
|
||||
import type { HTMLAttributes } from 'react';
|
||||
import { cn } from '@/utils/cn';
|
||||
@@ -343,7 +343,7 @@ export default function HomePage(): JSX.Element {
|
||||
Read docs
|
||||
</Link>
|
||||
<a
|
||||
href="https://githubbox.com/fuma-nama/next-docs-ui-template"
|
||||
href="https://githubbox.com/fuma-nama/@fuma-docs/ui-template"
|
||||
rel="noreferrer noopener"
|
||||
className={cn(
|
||||
buttonVariants({
|
||||
@@ -406,7 +406,7 @@ function Integration({
|
||||
<CodeBlock
|
||||
className="mt-2"
|
||||
lang="bash"
|
||||
code="pnpm create next-docs-app"
|
||||
code="pnpm create fuma-docs-app"
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-full h-[200px] overflow-hidden bg-secondary">
|
||||
@@ -486,7 +486,7 @@ function Hero(): JSX.Element {
|
||||
Getting Started
|
||||
</Link>
|
||||
<a
|
||||
href="https://githubbox.com/fuma-nama/next-docs-ui-template"
|
||||
href="https://githubbox.com/fuma-nama/@fuma-docs/ui-template"
|
||||
className={cn(
|
||||
buttonVariants({
|
||||
size: 'lg',
|
||||
|
||||
@@ -11,7 +11,7 @@ export const metadata = createMetadata({
|
||||
title: 'Showcase',
|
||||
description: 'Some cool websites using Fumadocs',
|
||||
openGraph: {
|
||||
url: 'https://next-docs-zeta.vercel.app/showcase',
|
||||
url: 'https://fuma-docs.vercel.app/showcase',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ExternalLinkIcon } from 'lucide-react';
|
||||
import type { Metadata } from 'next';
|
||||
import { Card, Cards } from 'next-docs-ui/mdx/card';
|
||||
import { DocsPage, DocsBody } from 'next-docs-ui/page';
|
||||
import { Card, Cards } from '@fuma-docs/ui/mdx/card';
|
||||
import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { utils, type Page } from '@/utils/source';
|
||||
import { createMetadata } from '@/utils/metadata';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DocsLayout } from 'next-docs-ui/layout';
|
||||
import { DocsLayout } from '@fuma-docs/ui/layout';
|
||||
import type { ReactNode } from 'react';
|
||||
import { LayoutTemplateIcon } from 'lucide-react';
|
||||
import { utils } from '@/utils/source';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { RootProvider } from 'next-docs-ui/provider';
|
||||
import { RootProvider } from '@fuma-docs/ui/provider';
|
||||
import dynamic from 'next/dynamic';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { HomeIcon } from 'lucide-react';
|
||||
import { Accordion, Accordions } from 'next-docs-ui/components/accordion';
|
||||
import { Callout } from 'next-docs-ui/components/callout';
|
||||
import { File, Files } from 'next-docs-ui/components/files';
|
||||
import { ImageZoom } from 'next-docs-ui/components/image-zoom';
|
||||
import { InlineTOC } from 'next-docs-ui/components/inline-toc';
|
||||
import { RollButton } from 'next-docs-ui/components/roll-button';
|
||||
import { Step, Steps } from 'next-docs-ui/components/steps';
|
||||
import { Tab, Tabs } from 'next-docs-ui/components/tabs';
|
||||
import { TypeTable } from 'next-docs-ui/components/type-table';
|
||||
import { Card } from 'next-docs-ui/mdx/card';
|
||||
import { Heading } from 'next-docs-ui/mdx/heading';
|
||||
import { Accordion, Accordions } from '@fuma-docs/ui/components/accordion';
|
||||
import { Callout } from '@fuma-docs/ui/components/callout';
|
||||
import { File, Files } from '@fuma-docs/ui/components/files';
|
||||
import { ImageZoom } from '@fuma-docs/ui/components/image-zoom';
|
||||
import { InlineTOC } from '@fuma-docs/ui/components/inline-toc';
|
||||
import { RollButton } from '@fuma-docs/ui/components/roll-button';
|
||||
import { Step, Steps } from '@fuma-docs/ui/components/steps';
|
||||
import { Tab, Tabs } from '@fuma-docs/ui/components/tabs';
|
||||
import { TypeTable } from '@fuma-docs/ui/components/type-table';
|
||||
import { Card } from '@fuma-docs/ui/mdx/card';
|
||||
import { Heading } from '@fuma-docs/ui/mdx/heading';
|
||||
import type { ReactNode } from 'react';
|
||||
import BannerImage from '@/public/banner.png';
|
||||
import { Wrapper } from './wrapper';
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import algo from 'algoliasearch/lite';
|
||||
import { cva } from 'class-variance-authority';
|
||||
import type { SharedProps } from 'next-docs-ui/components/dialog/search';
|
||||
import SearchDialog from 'next-docs-ui/components/dialog/search-algolia';
|
||||
import type { SharedProps } from '@fuma-docs/ui/components/dialog/search';
|
||||
import SearchDialog from '@fuma-docs/ui/components/dialog/search-algolia';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { modes } from '@/utils/modes';
|
||||
import { cn } from '@/utils/cn';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Pre } from 'next-docs-ui/mdx/pre';
|
||||
import { Pre } from '@fuma-docs/ui/mdx/pre';
|
||||
import { useMemo, type ComponentPropsWithoutRef } from 'react';
|
||||
import { getHighlighter } from 'shikiji';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ a page based on the given page tree.
|
||||
it exports a `useBreadcrumb` hook:
|
||||
|
||||
```ts
|
||||
import { useBreadcrumb } from 'next-docs-zeta/breadcrumb'
|
||||
import { useBreadcrumb } from '@fuma-docs/core/breadcrumb'
|
||||
|
||||
const tree: PageTree = ...
|
||||
const pathname = usePathname()
|
||||
|
||||
@@ -12,7 +12,7 @@ Component. `rel` property is automatically generated.
|
||||
Same as using `<a>`.
|
||||
|
||||
```mdx
|
||||
import Link from 'next-docs-zeta/link';
|
||||
import Link from '@fuma-docs/core/link';
|
||||
|
||||
<Link href="/docs/components">Click Me</Link>
|
||||
```
|
||||
@@ -27,7 +27,7 @@ Dynamic hrefs are no longer supported in Next.js App Router. You can enable
|
||||
dynamic hrefs by importing `dynamic-link` instead.
|
||||
|
||||
```mdx
|
||||
import { DynamicLink } from 'next-docs-zeta/dynamic-link';
|
||||
import { DynamicLink } from '@fuma-docs/core/dynamic-link';
|
||||
|
||||
<DynamicLink href="/[lang]/components">Click Me</DynamicLink>
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@ automatically.
|
||||
## Usage
|
||||
|
||||
```tsx
|
||||
import * as Base from 'next-docs-zeta/sidebar';
|
||||
import * as Base from '@fuma-docs/core/sidebar';
|
||||
|
||||
return (
|
||||
<Base.SidebarProvider>
|
||||
|
||||
@@ -8,7 +8,7 @@ A Table of Contents with active anchor observer and auto scroll.
|
||||
## Usage
|
||||
|
||||
```tsx
|
||||
import * as Base from 'next-docs-zeta/toc';
|
||||
import * as Base from '@fuma-docs/core/toc';
|
||||
|
||||
return (
|
||||
<Base.TOCProvider>
|
||||
@@ -47,7 +47,7 @@ boolean value, must be called under the TOC Provider.
|
||||
Useful for implementing advanced styling.
|
||||
|
||||
```ts
|
||||
import { useActiveAnchor } from 'next-docs-zeta/toc';
|
||||
import { useActiveAnchor } from '@fuma-docs/core/toc';
|
||||
|
||||
const isActive = useActiveAnchor(item.url);
|
||||
```
|
||||
|
||||
@@ -15,7 +15,7 @@ convenient to use and straightforward.
|
||||
|
||||
```ts title="contentlayer.config.ts"
|
||||
import { makeSource } from 'contentlayer/source-files';
|
||||
import { defaultConfig } from 'next-docs-zeta/contentlayer/configuration';
|
||||
import { defaultConfig } from '@fuma-docs/core/contentlayer/configuration';
|
||||
|
||||
export default makeSource(defaultConfig);
|
||||
```
|
||||
@@ -28,8 +28,8 @@ export default makeSource(defaultConfig);
|
||||
|
||||
```ts
|
||||
import { allDocs, allMeta } from 'contentlayer/generated';
|
||||
import { createContentlayerSource } from 'next-docs-zeta/contentlayer';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { createContentlayerSource } from '@fuma-docs/core/contentlayer';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
|
||||
export const docs = loader({
|
||||
baseUrl: '/docs',
|
||||
|
||||
@@ -17,7 +17,7 @@ App Router. It offers server-side functions and headless components.
|
||||
</Callout>
|
||||
|
||||
```package-install
|
||||
next-docs-zeta
|
||||
@fuma-docs/core
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -23,7 +23,7 @@ export const languages = ['en', 'cn'];
|
||||
```ts title="source.ts"
|
||||
import { languages } from '@/i18n';
|
||||
import { map } from '@/.map';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
|
||||
export const { getPage, getPages, pageTree } = loader({
|
||||
languages,
|
||||
@@ -35,7 +35,7 @@ export const { getPage, getPages, pageTree } = loader({
|
||||
|
||||
```ts title="middleware.ts"
|
||||
import { defaultLanguage, languages } from '@/i18n';
|
||||
import { createI18nMiddleware } from 'next-docs-zeta/middleware';
|
||||
import { createI18nMiddleware } from '@fuma-docs/core/middleware';
|
||||
import { NextRequest } from 'next/server';
|
||||
|
||||
export default createI18nMiddleware({
|
||||
|
||||
@@ -6,7 +6,7 @@ description: A remark plugin that generates content from files
|
||||
Add it as a remark plugin.
|
||||
|
||||
```ts
|
||||
import { remarkDynamicContent } from 'next-docs-zeta/mdx-plugins';
|
||||
import { remarkDynamicContent } from '@fuma-docs/core/mdx-plugins';
|
||||
|
||||
const config = {
|
||||
remarkPlugins: [
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Generate code blocks for installing packages
|
||||
Add the plugin to `remarkPlugins`.
|
||||
|
||||
```ts
|
||||
import { remarkInstall } from 'next-docs-zeta/mdx-plugins'
|
||||
import { remarkInstall } from '@fuma-docs/core/mdx-plugins'
|
||||
|
||||
const config = {
|
||||
remarkPlugins: [
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Extract information from your documents
|
||||
Add it as a remark plugin.
|
||||
|
||||
```ts
|
||||
import { remarkStructure } from 'next-docs-zeta/mdx-plugins';
|
||||
import { remarkStructure } from '@fuma-docs/core/mdx-plugins';
|
||||
|
||||
export default {
|
||||
remarkPlugins: [remarkStructure],
|
||||
|
||||
@@ -9,7 +9,7 @@ It extracts the headings of a MDX document to `vfile.data.toc`. You may write yo
|
||||
own plugin to convert it into a MDX export.
|
||||
|
||||
```ts
|
||||
import { remarkHeading } from 'next-docs-zeta/mdx-plugins';
|
||||
import { remarkHeading } from '@fuma-docs/core/mdx-plugins';
|
||||
|
||||
export default {
|
||||
remarkPlugins: [remarkHeading],
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"search",
|
||||
"---Sources---",
|
||||
"source-api",
|
||||
"next-docs-mdx",
|
||||
"@fuma-docs/mdx",
|
||||
"contentlayer"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export const tree = [
|
||||
You can import the type from server package.
|
||||
|
||||
```ts
|
||||
import type { PageTree } from 'next-docs-zeta/server'
|
||||
import type { PageTree } from '@fuma-docs/core/server'
|
||||
|
||||
const tree: PageTree = ...
|
||||
```
|
||||
|
||||
@@ -33,8 +33,8 @@ paragraphs are all indexed as a record, and the attribute for distinct is
|
||||
|
||||
```js
|
||||
import algosearch from 'algoliasearch'
|
||||
import { sync } from 'next-docs-zeta/search-algolia/server'
|
||||
import { structure } from 'next-docs-zeta/mdx-plugins'
|
||||
import { sync } from '@fuma-docs/core/search-algolia/server'
|
||||
import { structure } from '@fuma-docs/core/mdx-plugins'
|
||||
|
||||
const client = algosearch(...)
|
||||
|
||||
@@ -56,7 +56,7 @@ paragraphs are all indexed as a record, and the attribute for distinct is
|
||||
states with SWR.
|
||||
|
||||
```ts
|
||||
import { useAlgoliaSearch } from 'next-docs-zeta/search-algolia/client'
|
||||
import { useAlgoliaSearch } from '@fuma-docs/core/search-algolia/client'
|
||||
|
||||
const index = algoliasearch(...).initIndex('document')
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Index with the raw content of document.
|
||||
1. Create the API Route.
|
||||
|
||||
```tsx title="app/api/search/route.ts"
|
||||
import { createSearchAPI } from 'next-docs-zeta/search/server';
|
||||
import { createSearchAPI } from '@fuma-docs/core/search/server';
|
||||
|
||||
export const { GET } = createSearchAPI('simple', {
|
||||
indexes: allDocs.map((docs) => ({
|
||||
@@ -32,7 +32,7 @@ export const { GET } = createSearchAPI('simple', {
|
||||
2. Create a Search Dialog.
|
||||
|
||||
```tsx
|
||||
import { useDocsSearch } from 'next-docs-zeta/search/client';
|
||||
import { useDocsSearch } from '@fuma-docs/core/search/client';
|
||||
|
||||
export function Dialog() {
|
||||
const { search, setSearch, query } = useDocsSearch();
|
||||
@@ -81,7 +81,7 @@ you should use `createI18nSearchAPI`.
|
||||
```ts title="api/search/route.ts"
|
||||
import { languages } from '@/i18n';
|
||||
import { getPages } from '@/source';
|
||||
import { createI18nSearchAPI } from 'next-docs-zeta/search/server';
|
||||
import { createI18nSearchAPI } from '@fuma-docs/core/search/server';
|
||||
|
||||
export const { GET } = createI18nSearchAPI('advanced', {
|
||||
indexes: languages.map((lang) => {
|
||||
@@ -128,7 +128,7 @@ Same as simple search, but requires the `structuredData` property.
|
||||
|
||||
```ts
|
||||
import { allDocs } from 'contentlayer/generated';
|
||||
import { createSearchAPI } from 'next-docs-zeta/search/server';
|
||||
import { createSearchAPI } from '@fuma-docs/core/search/server';
|
||||
|
||||
export const { GET } = await createSearchAPI('advanced', {
|
||||
indexes: allDocs.map((docs) => ({
|
||||
@@ -147,7 +147,7 @@ documentation.
|
||||
|
||||
```ts
|
||||
import { allDocs } from 'contentlayer/generated';
|
||||
import { createSearchAPI } from 'next-docs-zeta/search/server';
|
||||
import { createSearchAPI } from '@fuma-docs/core/search/server';
|
||||
|
||||
export const { GET } = createSearchAPI('advanced', {
|
||||
indexes: allDocs.map((page) => ({
|
||||
|
||||
@@ -11,8 +11,8 @@ The output strictly follows [Page Conventions](/docs/headless/page-conventions).
|
||||
|
||||
```ts
|
||||
import { map } from '@/.map';
|
||||
import { createMDXSource } from 'next-docs-mdx';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { createMDXSource } from '@fuma-docs/mdx';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
|
||||
export const docs = loader({
|
||||
source: createMDXSource(map),
|
||||
@@ -74,7 +74,7 @@ loader({
|
||||
Load the [icon](/docs/headless/page-conventions#icons) from the data of pages and meta files.
|
||||
|
||||
```ts
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
import { icons } from 'lucide-react';
|
||||
import { createElement } from 'react';
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ For example:
|
||||
It requires a page tree and the url of page.
|
||||
|
||||
```ts
|
||||
import { findNeighbour } from 'next-docs-zeta/server';
|
||||
import { findNeighbour } from '@fuma-docs/core/server';
|
||||
|
||||
const neighbours = findNeighbour(tree, page.url);
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ Note: If you're using a CMS, you should use the API provided by the CMS instead.
|
||||
Parse markdown content and return an array of TOC items.
|
||||
|
||||
```ts
|
||||
import { getTableOfContents } from 'next-docs-zeta/server';
|
||||
import { getTableOfContents } from '@fuma-docs/core/server';
|
||||
|
||||
const toc = await getTableOfContents(page.body.raw);
|
||||
```
|
||||
@@ -27,7 +27,7 @@ Takes a portable text and slug function, return an array of TOC items with their
|
||||
slug generated using the slug function.
|
||||
|
||||
```ts
|
||||
import { getTableOfContentsFromPortableText } from 'next-docs-zeta/server';
|
||||
import { getTableOfContentsFromPortableText } from '@fuma-docs/core/server';
|
||||
|
||||
const posts = await client.fetch(query);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ description: Get the last edit time of a file in Github repository
|
||||
Pass your repository name, and the path to file.
|
||||
|
||||
```ts
|
||||
import { getGitLastEditTime } from 'next-docs-zeta/server';
|
||||
import { getGitLastEditTime } from '@fuma-docs/core/server';
|
||||
import { resolve } from 'url';
|
||||
|
||||
const time = await getGithubLastEdit({
|
||||
@@ -28,7 +28,7 @@ Learn more about
|
||||
[Authenticating to the REST API](https://docs.github.com/en/rest/overview/authenticating-to-the-rest-api).
|
||||
|
||||
```ts
|
||||
import { getGitLastEditTime } from 'next-docs-zeta/server'
|
||||
import { getGitLastEditTime } from '@fuma-docs/core/server'
|
||||
|
||||
const time = await getGithubLastEdit({
|
||||
...,
|
||||
|
||||
@@ -9,7 +9,7 @@ Accepts MDX/markdown content and return structurized data. Useful for
|
||||
implementing document search.
|
||||
|
||||
```ts
|
||||
import { structure } from 'next-docs-zeta/mdx-plugins';
|
||||
import { structure } from '@fuma-docs/core/mdx-plugins';
|
||||
|
||||
structure(page.body.raw);
|
||||
```
|
||||
@@ -20,7 +20,7 @@ If you have custom remark plugins enabled, such as
|
||||
plugins passed into the function:
|
||||
|
||||
```ts
|
||||
import { structure } from 'next-docs-zeta/mdx-plugins';
|
||||
import { structure } from '@fuma-docs/core/mdx-plugins';
|
||||
import remarkMath from 'remark-math';
|
||||
|
||||
structure(page.body.raw, [remarkMath]);
|
||||
|
||||
@@ -16,7 +16,7 @@ plugins for building a good documentation site.
|
||||
### Install Dependencies
|
||||
|
||||
```package-install
|
||||
next-docs-mdx @types/mdx
|
||||
@fuma-docs/mdx @types/mdx
|
||||
```
|
||||
|
||||
### Configuration
|
||||
@@ -24,7 +24,7 @@ next-docs-mdx @types/mdx
|
||||
Add this to your `next.config.mjs` file:
|
||||
|
||||
```js
|
||||
import createMDX from 'next-docs-mdx/config';
|
||||
import createMDX from '@fuma-docs/mdx/config';
|
||||
|
||||
const withMDX = createMDX();
|
||||
|
||||
@@ -49,7 +49,7 @@ Create `mdx-components.tsx` in your root directory.
|
||||
```tsx
|
||||
import type { MDXComponents } from 'mdx/types';
|
||||
// Assume you're using Fumadocs UI
|
||||
import defaultComponents from 'next-docs-ui/mdx/default';
|
||||
import defaultComponents from '@fuma-docs/ui/mdx/default';
|
||||
|
||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
return {
|
||||
@@ -68,8 +68,8 @@ The raw data of pages is stored in the `map` property from your `.map.ts` file.
|
||||
|
||||
```ts title="source.ts"
|
||||
import { map } from '@/.map';
|
||||
import { createMDXSource } from 'next-docs-mdx';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { createMDXSource } from '@fuma-docs/mdx';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
|
||||
export const { getPage, getPages, pageTree } = loader({
|
||||
baseUrl: '/docs',
|
||||
|
||||
@@ -9,7 +9,7 @@ This feature is not enabled by default, you can enable this in `next.config.mjs`
|
||||
When using `git`, please ensure you have Git installed on your local machine and the repository is not shallow cloned as it relies on your local Git history.
|
||||
|
||||
```js {3}
|
||||
import createMDX from 'next-docs-mdx/config';
|
||||
import createMDX from '@fuma-docs/mdx/config';
|
||||
|
||||
const withMDX = createMDX({
|
||||
mdxOptions: {
|
||||
|
||||
@@ -22,9 +22,9 @@ option.
|
||||
Extend the default frontmatter schema:
|
||||
|
||||
```ts title="source.ts"
|
||||
import { createMDXSource, defaultSchemas } from 'next-docs-mdx';
|
||||
import { createMDXSource, defaultSchemas } from '@fuma-docs/mdx';
|
||||
import { z } from 'zod';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
import { map } from '@/.map';
|
||||
|
||||
const frontmatterSchema = defaultSchemas.frontmatter.extend({
|
||||
@@ -49,7 +49,7 @@ utils.getPages().data; // should be your own frontmatter
|
||||
Furthermore, you can infer the type of pages and meta files with build-in type helpers of Source API.
|
||||
|
||||
```ts
|
||||
import type { InferMetaType, InferPageType } from 'next-docs-zeta/source';
|
||||
import type { InferMetaType, InferPageType } from '@fuma-docs/core/source';
|
||||
|
||||
export type Page = InferPageType<typeof utils>;
|
||||
export type Meta = InferMetaType<typeof utils>;
|
||||
|
||||
@@ -13,7 +13,7 @@ The layout of documentation pages, it must be nested under the
|
||||
Wrap the children and pass your page tree to the component.
|
||||
|
||||
```jsx
|
||||
import { DocsLayout } from 'next-docs-ui/layout';
|
||||
import { DocsLayout } from '@fuma-docs/ui/layout';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return <DocsLayout tree={tree}>{children}</DocsLayout>;
|
||||
@@ -42,7 +42,7 @@ If you want to share navbar and search dialog between other pages, you may use t
|
||||
It doesn't contain a sidebar, therefore, a page tree is not required.
|
||||
|
||||
```jsx
|
||||
import { Layout } from 'next-docs-ui/layout';
|
||||
import { Layout } from '@fuma-docs/ui/layout';
|
||||
|
||||
export default function HomeLayout({ children }) {
|
||||
return <Layout>{children}</Layout>;
|
||||
|
||||
@@ -10,7 +10,7 @@ The default Navbar component with a sidebar toggle and search dialog trigger.
|
||||
## Usage
|
||||
|
||||
```tsx
|
||||
import { Nav as OriginalNav } from 'next-docs-ui/nav';
|
||||
import { Nav as OriginalNav } from '@fuma-docs/ui/nav';
|
||||
|
||||
export function Nav() {
|
||||
return <OriginalNav title="My App" enableSidebar collapsibleSidebar />;
|
||||
|
||||
@@ -9,7 +9,7 @@ Footer, and Breadcrumb.
|
||||
## Usage
|
||||
|
||||
```mdx
|
||||
import { DocsPage, DocsBody } from 'next-docs-ui/page';
|
||||
import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
|
||||
|
||||
<DocsPage>
|
||||
<DocsBody>...</DocsBody>
|
||||
@@ -46,7 +46,7 @@ import { DocsPage, DocsBody } from 'next-docs-ui/page';
|
||||
To apply the [Typography](/docs/ui/theme#typography) styles, wrap your content in the `DocsBody` component.
|
||||
|
||||
```mdx
|
||||
import { DocsBody } from 'next-docs-ui/page';
|
||||
import { DocsBody } from '@fuma-docs/ui/page';
|
||||
|
||||
<DocsBody>
|
||||
<h1>This heading looks good!</h1>
|
||||
|
||||
@@ -9,7 +9,7 @@ for search dialog. It should be located at the root layout.
|
||||
## Usage
|
||||
|
||||
```jsx
|
||||
import { RootProvider } from 'next-docs-ui/provider';
|
||||
import { RootProvider } from '@fuma-docs/ui/provider';
|
||||
|
||||
export default function Layout({ children }) {
|
||||
return (
|
||||
|
||||
@@ -11,21 +11,21 @@ No arguments needed.
|
||||
<Tab value="npm">
|
||||
|
||||
```bash
|
||||
npm create next-docs-app
|
||||
npm create fuma-docs-app
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab value="pnpm">
|
||||
|
||||
```bash
|
||||
pnpm create next-docs-app
|
||||
pnpm create fuma-docs-app
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab value="yarn">
|
||||
|
||||
```bash
|
||||
yarn create next-docs-app
|
||||
yarn create fuma-docs-app
|
||||
```
|
||||
|
||||
</Tab>
|
||||
|
||||
@@ -14,7 +14,7 @@ Based on
|
||||
[Radix UI Accordion](https://www.radix-ui.com/primitives/docs/components/accordion).
|
||||
|
||||
```mdx
|
||||
import { Accordion, Accordions } from 'next-docs-ui/components/accordion';
|
||||
import { Accordion, Accordions } from '@fuma-docs/ui/components/accordion';
|
||||
|
||||
<Accordions>
|
||||
<Accordion title="My Title">
|
||||
|
||||
@@ -11,7 +11,7 @@ import { HomeIcon } from 'lucide-react';
|
||||
Add it to your MDX components.
|
||||
|
||||
```mdx {5-6}
|
||||
import { Card, Cards } from 'next-docs-ui/mdx/card';
|
||||
import { Card, Cards } from '@fuma-docs/ui/mdx/card';
|
||||
|
||||
<MDX
|
||||
components={{
|
||||
|
||||
@@ -31,7 +31,7 @@ Display code blocks, required by default.
|
||||
You can add this component to `mdxComponents`.
|
||||
|
||||
```mdx {5}
|
||||
import { Pre } from 'next-docs-ui/mdx/pre';
|
||||
import { Pre } from '@fuma-docs/ui/mdx/pre';
|
||||
|
||||
<MDX
|
||||
components={{
|
||||
|
||||
@@ -11,7 +11,7 @@ preview: 'files'
|
||||
Wrap file components in `Files`.
|
||||
|
||||
```mdx
|
||||
import { File, Files } from 'next-docs-ui/components/files';
|
||||
import { File, Files } from '@fuma-docs/ui/components/files';
|
||||
|
||||
<Files>
|
||||
<File title="app" defaultOpen>
|
||||
|
||||
@@ -11,7 +11,7 @@ The heading component which automatically adds the `id` prop.
|
||||
Add it to your MDX components, from `h1` to `h6`.
|
||||
|
||||
```mdx {5-10}
|
||||
import { Heading } from 'next-docs-ui/mdx/heading';
|
||||
import { Heading } from '@fuma-docs/ui/mdx/heading';
|
||||
|
||||
<MDX
|
||||
components={{
|
||||
|
||||
@@ -13,7 +13,7 @@ Add it to your MDX components.
|
||||
> A default `sizes` property will be defined if not specified
|
||||
|
||||
```tsx
|
||||
import { ImageZoom } from 'next-docs-ui/components/image-zoom';
|
||||
import { ImageZoom } from '@fuma-docs/ui/components/image-zoom';
|
||||
|
||||
const components = {
|
||||
img: (props) => <ImageZoom {...props} />,
|
||||
|
||||
@@ -9,7 +9,7 @@ preview: inline-toc
|
||||
Pass TOC items to the component.
|
||||
|
||||
```mdx
|
||||
import { InlineTOC } from 'next-docs-ui/components/inline-toc';
|
||||
import { InlineTOC } from '@fuma-docs/ui/components/inline-toc';
|
||||
|
||||
<InlineTOC items={toc} />
|
||||
```
|
||||
|
||||
@@ -10,11 +10,11 @@ The default components include [Card](/docs/ui/components/card), [Code Block](/d
|
||||
For Client Components:
|
||||
|
||||
```ts
|
||||
import defaultComponents from 'next-docs-ui/mdx/default-client';
|
||||
import defaultComponents from '@fuma-docs/ui/mdx/default-client';
|
||||
```
|
||||
|
||||
For Server Components:
|
||||
|
||||
```ts
|
||||
import defaultComponents from 'next-docs-ui/mdx/default';
|
||||
import defaultComponents from '@fuma-docs/ui/mdx/default';
|
||||
```
|
||||
|
||||
@@ -13,7 +13,7 @@ A button that scrolls to the top.
|
||||
Add this component to your page.
|
||||
|
||||
```mdx title="app/docs/[[...slug]]/page.tsx"
|
||||
import { RollButton } from 'next-docs-ui/components/roll-button';
|
||||
import { RollButton } from '@fuma-docs/ui/components/roll-button';
|
||||
|
||||
<DocsPage toc={toc}>
|
||||
<RollButton />
|
||||
|
||||
@@ -11,7 +11,7 @@ preview: steps
|
||||
Put your steps into the `Steps` container.
|
||||
|
||||
```mdx
|
||||
import { Step, Steps } from 'next-docs-ui/components/steps';
|
||||
import { Step, Steps } from '@fuma-docs/ui/components/steps';
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
|
||||
@@ -13,7 +13,7 @@ preview: tabs
|
||||
Import it in your MDX documents.
|
||||
|
||||
```mdx
|
||||
import { Tab, Tabs } from 'next-docs-ui/components/tabs';
|
||||
import { Tab, Tabs } from '@fuma-docs/ui/components/tabs';
|
||||
|
||||
<Tabs items={['Javascript', 'Rust']}>
|
||||
<Tab value="Javascript">Javascript is weird</Tab>
|
||||
@@ -63,7 +63,7 @@ Set a default value by passing `defaultIndex`.
|
||||
You can use the styled Radix UI primitive directly from exported `Primitive`.
|
||||
|
||||
```mdx
|
||||
import { Primitive } from 'next-docs-ui/components/tabs';
|
||||
import { Primitive } from '@fuma-docs/ui/components/tabs';
|
||||
|
||||
<Primitive.Tabs>
|
||||
<Primitive.TabsList>
|
||||
|
||||
@@ -11,7 +11,7 @@ preview: type-table
|
||||
It accepts a `type` property.
|
||||
|
||||
```mdx
|
||||
import { TypeTable } from 'next-docs-ui/components/type-table';
|
||||
import { TypeTable } from '@fuma-docs/ui/components/type-table';
|
||||
|
||||
<TypeTable
|
||||
type={{
|
||||
|
||||
@@ -8,14 +8,14 @@ Fumadocs UI is the built-in user interface integration for Fumadocs, built on th
|
||||
|
||||
## Automatic Installation
|
||||
|
||||
Create a new app with `create-next-docs-app`.
|
||||
Create a new app with `create-fuma-docs-app`.
|
||||
|
||||
```bash
|
||||
npx create-next-docs-app
|
||||
npx create-fuma-docs-app
|
||||
# or
|
||||
pnpm create next-docs-app
|
||||
pnpm create fuma-docs-app
|
||||
# or
|
||||
yarn create next-docs-app
|
||||
yarn create fuma-docs-app
|
||||
```
|
||||
|
||||
## Manual Installation
|
||||
@@ -23,7 +23,7 @@ yarn create next-docs-app
|
||||
Create a new Next.js application with `create-next-app`, and install required packages.
|
||||
|
||||
```package-install
|
||||
next-docs-ui next-docs-zeta
|
||||
@fuma-docs/ui @fuma-docs/core
|
||||
```
|
||||
|
||||
### Configuration
|
||||
@@ -43,7 +43,7 @@ You have to configure the library correctly following their setup guide before c
|
||||
You can import the pre-built stylesheet in the root layout.
|
||||
|
||||
```ts
|
||||
import 'next-docs-ui/style.css';
|
||||
import '@fuma-docs/ui/style.css';
|
||||
```
|
||||
|
||||
For Tailwind CSS projects, you may use [the official plugin](/docs/ui/theme) instead.
|
||||
@@ -55,7 +55,7 @@ For Tailwind CSS projects, you may use [the official plugin](/docs/ui/theme) ins
|
||||
Wrap the entire application inside [Root Provider](/docs/ui/blocks/root-provider).
|
||||
|
||||
```tsx {8}
|
||||
import { RootProvider } from 'next-docs-ui/provider';
|
||||
import { RootProvider } from '@fuma-docs/ui/provider';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
@@ -74,7 +74,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
Create a new catch-all route for our docs, and give it a proper layout.
|
||||
|
||||
```tsx title="app/docs/[[...slug]]/layout.tsx"
|
||||
import { DocsLayout } from 'next-docs-ui/layout';
|
||||
import { DocsLayout } from '@fuma-docs/ui/layout';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export default function RootDocsLayout({ children }: { children: ReactNode }) {
|
||||
@@ -166,7 +166,7 @@ Try installing `[email protected]`.
|
||||
|
||||
### Demo
|
||||
|
||||
Open in [CodeSandbox](https://githubbox.com/fuma-nama/next-docs-ui-template).
|
||||
Open in [CodeSandbox](https://githubbox.com/fuma-nama/@fuma-docs/ui-template).
|
||||
|
||||
## Learn More
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Put your pages and layouts under `/app/[lang]`, where the 'lang' parameter is at
|
||||
'use client';
|
||||
|
||||
import { defaultLanguage } from '@/i18n';
|
||||
import { I18nProvider } from 'next-docs-ui/i18n';
|
||||
import { I18nProvider } from '@fuma-docs/ui/i18n';
|
||||
import { useParams, usePathname, useRouter } from 'next/navigation';
|
||||
import { ReactNode, useCallback } from 'react';
|
||||
|
||||
@@ -77,8 +77,8 @@ component to the sidebar same as following:
|
||||
|
||||
```tsx title="[lang]/docs/layout.tsx"
|
||||
import { pageTree } from '@/source';
|
||||
import { LanguageSelect } from 'next-docs-ui/i18n';
|
||||
import { DocsLayout } from 'next-docs-ui/layout';
|
||||
import { LanguageSelect } from '@fuma-docs/ui/i18n';
|
||||
import { DocsLayout } from '@fuma-docs/ui/layout';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export default function Layout({
|
||||
|
||||
@@ -21,7 +21,7 @@ Add the remark/rehype plugins you have installed above.
|
||||
The code might be vary depending on your content source, here is an example for Fumadocs MDX:
|
||||
|
||||
```ts
|
||||
import createNextDocs from 'next-docs-mdx/config';
|
||||
import createNextDocs from '@fuma-docs/mdx/config';
|
||||
import rehypeKatex from 'rehype-katex';
|
||||
import remarkMath from 'remark-math';
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ description: Special events hosted by the Museum
|
||||
toc: false
|
||||
---
|
||||
|
||||
import { Root, API, APIInfo, APIExample, Property } from 'next-docs-ui/components/api'
|
||||
import { Tabs, Tab } from 'next-docs-ui/components/tabs'
|
||||
import { Accordion, Accordions } from 'next-docs-ui/components/accordion';
|
||||
import { Root, API, APIInfo, APIExample, Property } from '@fuma-docs/ui/components/api'
|
||||
import { Tabs, Tab } from '@fuma-docs/ui/components/tabs'
|
||||
import { Accordion, Accordions } from '@fuma-docs/ui/components/accordion';
|
||||
|
||||
<Root>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ description: Operational information about the museum.
|
||||
toc: false
|
||||
---
|
||||
|
||||
import { Root, API, APIInfo, APIExample, Property } from 'next-docs-ui/components/api'
|
||||
import { Tabs, Tab } from 'next-docs-ui/components/tabs'
|
||||
import { Accordion, Accordions } from 'next-docs-ui/components/accordion';
|
||||
import { Root, API, APIInfo, APIExample, Property } from '@fuma-docs/ui/components/api'
|
||||
import { Tabs, Tab } from '@fuma-docs/ui/components/tabs'
|
||||
import { Accordion, Accordions } from '@fuma-docs/ui/components/accordion';
|
||||
|
||||
<Root>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ description: Museum tickets for general entrance or special events.
|
||||
toc: false
|
||||
---
|
||||
|
||||
import { Root, API, APIInfo, APIExample, Property } from 'next-docs-ui/components/api'
|
||||
import { Tabs, Tab } from 'next-docs-ui/components/tabs'
|
||||
import { Accordion, Accordions } from 'next-docs-ui/components/accordion';
|
||||
import { Root, API, APIInfo, APIExample, Property } from '@fuma-docs/ui/components/api'
|
||||
import { Tabs, Tab } from '@fuma-docs/ui/components/tabs'
|
||||
import { Accordion, Accordions } from '@fuma-docs/ui/components/accordion';
|
||||
|
||||
<Root>
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@ the setup guide, see [Integrate Algolia Search](/docs/headless/search/algolia).
|
||||
|
||||
While generally we recommend building your own search with their client-side
|
||||
SDK, you can use the built-in dialog from
|
||||
`next-docs-ui/components/dialog/search-algolia`.
|
||||
`@fuma-docs/ui/components/dialog/search-algolia`.
|
||||
|
||||
First, create a separate client component for the dialog.
|
||||
|
||||
```tsx title="Client Component"
|
||||
import algo from 'algoliasearch/lite';
|
||||
import type { SharedProps } from 'next-docs-ui/components/dialog/search';
|
||||
import SearchDialog from 'next-docs-ui/components/dialog/search-algolia';
|
||||
import type { SharedProps } from '@fuma-docs/ui/components/dialog/search';
|
||||
import SearchDialog from '@fuma-docs/ui/components/dialog/search-algolia';
|
||||
|
||||
const client = algo(appId, apiKey);
|
||||
const index = client.initIndex(indexName);
|
||||
@@ -44,7 +44,7 @@ export default function CustomSearchDialog(props: SharedProps) {
|
||||
Then, lazy load the dialog with `next/dynamic`.
|
||||
|
||||
```tsx title="Provider (Client Component)"
|
||||
import { RootProvider } from 'next-docs-ui/provider';
|
||||
import { RootProvider } from '@fuma-docs/ui/provider';
|
||||
import dynamic from 'next/dynamic';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
@@ -99,7 +99,7 @@ you may use the `SearchDialog` component.
|
||||
import {
|
||||
SearchDialog,
|
||||
type SharedProps
|
||||
} from 'next-docs-ui/components/dialog/search'
|
||||
} from '@fuma-docs/ui/components/dialog/search'
|
||||
|
||||
export default function CustomSearchDialog(props: SharedProps) { ... }
|
||||
```
|
||||
|
||||
@@ -12,7 +12,7 @@ import { blueTheme } from '@/components/themes.js';
|
||||
You can import the pre-built stylesheet.
|
||||
|
||||
```tsx
|
||||
import 'next-docs-ui/style.css';
|
||||
import '@fuma-docs/ui/style.css';
|
||||
```
|
||||
|
||||
> Notice that the stylesheet performs preflight (or normalization)
|
||||
@@ -20,20 +20,20 @@ import 'next-docs-ui/style.css';
|
||||
For Tailwind CSS projects, please use the built-in Tailwind CSS plugin instead.
|
||||
|
||||
```js title="tailwind.config.js"
|
||||
const { createPreset } = require('next-docs-ui/tailwind-plugin');
|
||||
const { createPreset } = require('@fuma-docs/ui/tailwind-plugin');
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
darkMode: 'class',
|
||||
presets: [createPreset()],
|
||||
content: [
|
||||
'./node_modules/next-docs-ui/dist/**/*.js',
|
||||
'./node_modules/@fuma-docs/ui/dist/**/*.js',
|
||||
...
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
> Ensure all files inside `next-docs-ui` are included in the `content` property.
|
||||
> Ensure all files inside `@fuma-docs/ui` are included in the `content` property.
|
||||
|
||||
### Global Styles
|
||||
|
||||
@@ -120,7 +120,7 @@ It comes with the DocsUI Tailwind CSS plugin by default, it introduces new color
|
||||
This plugin also provides several theme presets out-of-the-box, you can pick one you prefer rather than the default one.
|
||||
|
||||
```js {8}
|
||||
const { createPreset } = require('next-docs-ui/tailwind-plugin');
|
||||
const { createPreset } = require('@fuma-docs/ui/tailwind-plugin');
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { MDXComponents } from 'mdx/types';
|
||||
import { Accordion, Accordions } from 'next-docs-ui/components/accordion';
|
||||
import { Callout } from 'next-docs-ui/components/callout';
|
||||
import { Tab, Tabs } from 'next-docs-ui/components/tabs';
|
||||
import { TypeTable } from 'next-docs-ui/components/type-table';
|
||||
import defaultComponents from 'next-docs-ui/mdx/default';
|
||||
import { Pre } from 'next-docs-ui/mdx/pre';
|
||||
import { Accordion, Accordions } from '@fuma-docs/ui/components/accordion';
|
||||
import { Callout } from '@fuma-docs/ui/components/callout';
|
||||
import { Tab, Tabs } from '@fuma-docs/ui/components/tabs';
|
||||
import { TypeTable } from '@fuma-docs/ui/components/type-table';
|
||||
import defaultComponents from '@fuma-docs/ui/mdx/default';
|
||||
import { Pre } from '@fuma-docs/ui/mdx/pre';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Wrapper } from '@/components/preview/wrapper';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import createBundleAnalyzer from '@next/bundle-analyzer';
|
||||
import createNextDocs from 'next-docs-mdx/config';
|
||||
import createNextDocs from '@fuma-docs/mdx/config';
|
||||
import {
|
||||
remarkDynamicContent,
|
||||
remarkInstall,
|
||||
} from 'next-docs-zeta/mdx-plugins';
|
||||
} from '@fuma-docs/core/mdx-plugins';
|
||||
import rehypeKatex from 'rehype-katex';
|
||||
import remarkMath from 'remark-math';
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fuma-docs/core": "workspace:*",
|
||||
"@fuma-docs/mdx": "workspace:*",
|
||||
"@fuma-docs/ui": "workspace:*",
|
||||
"@next/env": "^14.0.0",
|
||||
"algoliasearch": "^4.20.0",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
@@ -20,9 +23,6 @@
|
||||
"katex": "^0.16.8",
|
||||
"lucide-react": "^0.298.0",
|
||||
"next": "14.0.4",
|
||||
"next-docs-mdx": "workspace:*",
|
||||
"next-docs-ui": "workspace:*",
|
||||
"next-docs-zeta": "workspace:*",
|
||||
"phenomenon": "^1.6.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
Host: https://next-docs-zeta.vercel.app
|
||||
Host: https://fuma-docs.vercel.app
|
||||
|
||||
Sitemap: https://next-docs-zeta.vercel.app/sitemap.xml
|
||||
Sitemap: https://fuma-docs.vercel.app/sitemap.xml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { createPreset } = require('next-docs-ui/tailwind-plugin');
|
||||
const { createPreset } = require('@fuma-docs/ui/tailwind-plugin');
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
@@ -8,7 +8,7 @@ module.exports = {
|
||||
'./app/**/*.{ts,tsx}',
|
||||
'./content/**/*.mdx',
|
||||
'./mdx-components.tsx',
|
||||
'./node_modules/next-docs-ui/dist/**/*.js',
|
||||
'./node_modules/@fuma-docs/ui/dist/**/*.js',
|
||||
],
|
||||
presets: [createPreset()],
|
||||
theme: {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import env from '@next/env';
|
||||
import algosearch from 'algoliasearch';
|
||||
import { sync } from 'next-docs-zeta/search-algolia/server';
|
||||
import { sync } from '@fuma-docs/core/search-algolia/server';
|
||||
|
||||
env.loadEnvConfig(process.cwd());
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export function createMetadata(override: Metadata): Metadata {
|
||||
openGraph: {
|
||||
title: override.title ?? undefined,
|
||||
description: override.description ?? undefined,
|
||||
url: 'https://next-docs-zeta.vercel.app',
|
||||
url: 'https://fuma-docs.vercel.app',
|
||||
images: '/banner.png',
|
||||
siteName: 'Fumadocs',
|
||||
...override.openGraph,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import mdx from '../../../packages/mdx/package.json';
|
||||
import ui from '../../../packages/ui/package.json';
|
||||
import zeta from '../../../packages/headless/package.json';
|
||||
import zeta from '../../../packages/core/package.json';
|
||||
|
||||
export interface Mode {
|
||||
param: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { writeFileSync } from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { createMDXSource, defaultSchemas } from 'next-docs-mdx';
|
||||
import type { StructuredData } from 'next-docs-zeta/mdx-plugins';
|
||||
import { createMDXSource, defaultSchemas } from '@fuma-docs/mdx';
|
||||
import type { StructuredData } from '@fuma-docs/core/mdx-plugins';
|
||||
import { PHASE_PRODUCTION_BUILD } from 'next/constants';
|
||||
import { z } from 'zod';
|
||||
import type { InferMetaType, InferPageType } from 'next-docs-zeta/source';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import type { InferMetaType, InferPageType } from '@fuma-docs/core/source';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
import { icons } from 'lucide-react';
|
||||
import { map } from '@/.map';
|
||||
import { create } from '@/components/ui/icon';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getPages } from '@/app/source';
|
||||
import { createSearchAPI } from 'next-docs-zeta/search/server';
|
||||
import { createSearchAPI } from '@fuma-docs/core/search/server';
|
||||
|
||||
export const { GET } = createSearchAPI('advanced', {
|
||||
indexes: getPages()!.map((page) => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useMDXComponent } from 'next-contentlayer/hooks';
|
||||
import defaultComponents from 'next-docs-ui/mdx/default-client';
|
||||
import defaultComponents from '@fuma-docs/ui/mdx/default-client';
|
||||
|
||||
const components = {
|
||||
...defaultComponents,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Content } from './content';
|
||||
import { getPage, getPages } from '@/app/source';
|
||||
import type { Metadata } from 'next';
|
||||
import { DocsPage, DocsBody } from 'next-docs-ui/page';
|
||||
import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
export default async function Page({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { pageTree } from '../source';
|
||||
import { DocsLayout } from 'next-docs-ui/layout';
|
||||
import { DocsLayout } from '@fuma-docs/ui/layout';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export default function RootDocsLayout({ children }: { children: ReactNode }) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import './global.css';
|
||||
import { RootProvider } from 'next-docs-ui/provider';
|
||||
import { RootProvider } from '@fuma-docs/ui/provider';
|
||||
import { Inter } from 'next/font/google';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { allDocs, allMeta } from 'contentlayer/generated';
|
||||
import { createContentlayerSource } from 'next-docs-zeta/contentlayer';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { createContentlayerSource } from '@fuma-docs/core/contentlayer';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
|
||||
export const { pageTree, getPages, getPage } = loader({
|
||||
baseUrl: '/docs',
|
||||
|
||||
@@ -9,10 +9,7 @@ Hey there!
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card
|
||||
title="Learn more about Fumadocs"
|
||||
href="https://next-docs-zeta.vercel.app"
|
||||
/>
|
||||
<Card title="Learn more about Fumadocs" href="https://fuma-docs.vercel.app" />
|
||||
</Cards>
|
||||
|
||||
### Heading
|
||||
|
||||
@@ -9,10 +9,7 @@ Hey there!
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card
|
||||
title="Learn more about Fumadocs"
|
||||
href="https://next-docs-zeta.vercel.app"
|
||||
/>
|
||||
<Card title="Learn more about Fumadocs" href="https://fuma-docs.vercel.app" />
|
||||
</Cards>
|
||||
|
||||
### Heading
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { makeSource } from 'contentlayer/source-files';
|
||||
import { defaultConfig } from 'next-docs-zeta/contentlayer/configuration';
|
||||
import { defaultConfig } from '@fuma-docs/core/contentlayer/configuration';
|
||||
|
||||
export default makeSource(defaultConfig);
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fuma-docs/core": "7.1.2",
|
||||
"@fuma-docs/ui": "7.1.2",
|
||||
"contentlayer": "0.3.4",
|
||||
"next": "14.0.4",
|
||||
"next-contentlayer": "0.3.4",
|
||||
"next-docs-ui": "7.1.2",
|
||||
"next-docs-zeta": "7.1.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { docsUi, docsUiPlugins } = require('next-docs-ui/tailwind-plugin');
|
||||
const { docsUi, docsUiPlugins } = require('@fuma-docs/ui/tailwind-plugin');
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
'./components/**/*.{ts,tsx}',
|
||||
'./app/**/*.{ts,tsx}',
|
||||
'./content/**/*.mdx',
|
||||
'./node_modules/next-docs-ui/dist/**/*.js',
|
||||
'./node_modules/@fuma-docs/ui/dist/**/*.js',
|
||||
],
|
||||
plugins: [...docsUiPlugins, docsUi],
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getPages } from '@/app/source';
|
||||
import { createSearchAPI } from 'next-docs-zeta/search/server';
|
||||
import { createSearchAPI } from '@fuma-docs/core/search/server';
|
||||
|
||||
export const { GET } = createSearchAPI('advanced', {
|
||||
indexes: getPages().map((page) => ({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getPage, getPages } from '@/app/source';
|
||||
import type { Metadata } from 'next';
|
||||
import { DocsPage, DocsBody } from 'next-docs-ui/page';
|
||||
import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
export default async function Page({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { pageTree } from '../source';
|
||||
import { DocsLayout } from 'next-docs-ui/layout';
|
||||
import { DocsLayout } from '@fuma-docs/ui/layout';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export default function RootDocsLayout({ children }: { children: ReactNode }) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RootProvider } from 'next-docs-ui/provider';
|
||||
import 'next-docs-ui/style.css';
|
||||
import { RootProvider } from '@fuma-docs/ui/provider';
|
||||
import '@fuma-docs/ui/style.css';
|
||||
import { Inter } from 'next/font/google';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { map } from '@/.map';
|
||||
import { createMDXSource } from 'next-docs-mdx';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { createMDXSource } from '@fuma-docs/mdx';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
|
||||
export const { getPage, getPages, pageTree } = loader({
|
||||
baseUrl: '/docs',
|
||||
|
||||
@@ -9,10 +9,7 @@ Hey there!
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card
|
||||
title="Learn more about Fumadocs"
|
||||
href="https://next-docs-zeta.vercel.app"
|
||||
/>
|
||||
<Card title="Learn more about Fumadocs" href="https://fuma-docs.vercel.app" />
|
||||
</Cards>
|
||||
|
||||
### Heading
|
||||
|
||||
@@ -9,10 +9,7 @@ Hey there!
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card
|
||||
title="Learn more about Fumadocs"
|
||||
href="https://next-docs-zeta.vercel.app"
|
||||
/>
|
||||
<Card title="Learn more about Fumadocs" href="https://fuma-docs.vercel.app" />
|
||||
</Cards>
|
||||
|
||||
### Heading
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { MDXComponents } from 'mdx/types';
|
||||
import defaultComponents from 'next-docs-ui/mdx/default';
|
||||
import defaultComponents from '@fuma-docs/ui/mdx/default';
|
||||
|
||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import createNextDocsMDX from 'next-docs-mdx/config';
|
||||
import createNextDocsMDX from '@fuma-docs/mdx/config';
|
||||
|
||||
const withFumaMDX = createNextDocsMDX();
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fuma-docs/core": "7.1.2",
|
||||
"@fuma-docs/mdx": "7.1.2",
|
||||
"@fuma-docs/ui": "7.1.2",
|
||||
"next": "14.0.4",
|
||||
"next-docs-mdx": "7.1.2",
|
||||
"next-docs-ui": "7.1.2",
|
||||
"next-docs-zeta": "7.1.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getPages } from '@/app/source';
|
||||
import { createSearchAPI } from 'next-docs-zeta/search/server';
|
||||
import { createSearchAPI } from '@fuma-docs/core/search/server';
|
||||
|
||||
export const { GET } = createSearchAPI('simple', {
|
||||
indexes: getPages().map((page) => ({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useMDXComponent } from 'next-contentlayer/hooks';
|
||||
import defaultComponents from 'next-docs-ui/mdx/default-client';
|
||||
import defaultComponents from '@fuma-docs/ui/mdx/default-client';
|
||||
|
||||
const components = {
|
||||
...defaultComponents,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Content } from './content';
|
||||
import { getPage, getPages } from '@/app/source';
|
||||
import type { Metadata } from 'next';
|
||||
import { DocsPage, DocsBody } from 'next-docs-ui/page';
|
||||
import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
export default async function Page({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { pageTree } from '../source';
|
||||
import { DocsLayout } from 'next-docs-ui/layout';
|
||||
import { DocsLayout } from '@fuma-docs/ui/layout';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export default function RootDocsLayout({ children }: { children: ReactNode }) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RootProvider } from 'next-docs-ui/provider';
|
||||
import 'next-docs-ui/style.css';
|
||||
import { RootProvider } from '@fuma-docs/ui/provider';
|
||||
import '@fuma-docs/ui/style.css';
|
||||
import { Inter } from 'next/font/google';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { allDocs, allMeta } from 'contentlayer/generated';
|
||||
import { createContentlayerSource } from 'next-docs-zeta/contentlayer';
|
||||
import { loader } from 'next-docs-zeta/source';
|
||||
import { createContentlayerSource } from '@fuma-docs/core/contentlayer';
|
||||
import { loader } from '@fuma-docs/core/source';
|
||||
|
||||
export const { getPage, pageTree, getPages } = loader({
|
||||
baseUrl: '/docs',
|
||||
|
||||
@@ -9,10 +9,7 @@ Hey there!
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card
|
||||
title="Learn more about Fumadocs"
|
||||
href="https://next-docs-zeta.vercel.app"
|
||||
/>
|
||||
<Card title="Learn more about Fumadocs" href="https://fuma-docs.vercel.app" />
|
||||
</Cards>
|
||||
|
||||
### Heading
|
||||
|
||||
@@ -9,10 +9,7 @@ Hey there!
|
||||
|
||||
<Cards>
|
||||
<Card title="Learn more about Next.js" href="https://nextjs.org/docs" />
|
||||
<Card
|
||||
title="Learn more about Fumadocs"
|
||||
href="https://next-docs-zeta.vercel.app"
|
||||
/>
|
||||
<Card title="Learn more about Fumadocs" href="https://fuma-docs.vercel.app" />
|
||||
</Cards>
|
||||
|
||||
### Heading
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user