Announce the new name: Fumadocs

This commit is contained in:
Fuma Nama
2024-01-19 21:33:17 +08:00
parent a2f481958c
commit 06f72a1c01
162 changed files with 360 additions and 420 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
---
'@fuma-docs/ui': major
'fumadocs-ui': major
---
**Improve internationalized routing**
+1 -6
View File
@@ -3,12 +3,7 @@
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
[
"@fuma-docs/core",
"@fuma-docs/ui",
"@fuma-docs/mdx",
"create-fuma-docs-app"
]
["fumadocs-core", "fumadocs-ui", "fumadocs-mdx", "create-fumadocs-app"]
],
"linked": [],
"access": "restricted",
+12 -9
View File
@@ -1,16 +1,19 @@
---
'@fuma-docs/core': major
'create-fuma-docs-app': major
'@fuma-docs/mdx': major
'@fuma-docs/ui': major
'fumadocs-core': major
'create-fumadocs-app': major
'fumadocs-mdx': major
'fumadocs-ui': major
'fumadocs-openapi': major
---
**Rename to `@fuma-docs/*`**
**Rename to Fumadocs**
`next-docs-zeta` -> `@fuma-docs/core`
`next-docs-zeta` -> `fumadocs-core`
`next-docs-ui` -> `@fuma-docs/ui`
`next-docs-ui` -> `fumadocs-ui`
`next-docs-mdx` -> `@fuma-docs/mdx`
`next-docs-mdx` -> `fumadocs-mdx`
`create-next-docs-app` -> `create-fuma-docs-app`
`@fuma-docs/openapi` -> `fumadocs-openapi`
`create-next-docs-app` -> `create-fumadocs-app`
+2 -33
View File
@@ -2,40 +2,9 @@
The framework for building documentation websites in Next.js.
📘 Learn More: [Documentation](https://fuma-docs.vercel.app)
📘 Learn More: [Documentation](https://fumadocs.vercel.app).
## Installation
This monorepo includes three packages.
### `fuma-docs/ui`
The documentation framework that powered by Next.js. It offers many out-of-the-box
features along with a well-designed user interface.
```bash
npm install fuma-docs/ui
```
### `fuma-docs/core`
The headless UI library for building documentation sites.
It includes necessary parts such as TOC, Sidebar, and some useful utilities.
```bash
npm install fuma-docs/core
```
### Create Fumadocs App
A CLI tool that generates documentation sites.
```bash
pnpm create fuma-docs-app
```
### Compatiability
## Compatiability
All packages are **ESM only**.
+1 -1
View File
@@ -1,4 +1,4 @@
import { Layout } from '@fuma-docs/ui/layout';
import { Layout } from 'fumadocs-ui/layout';
import type { ReactNode } from 'react';
import { layoutOptions } from '../docs/layout';
+1 -1
View File
@@ -103,7 +103,7 @@ export function Previews(): JSX.Element {
}
export function CreateAppAnimation(): JSX.Element {
const installCmd = 'npm create fuma-docs-app';
const installCmd = 'npm create fumadocs-app';
const tickTime = 100;
const timeCommandEnter = installCmd.length;
const timeCommandRun = timeCommandEnter + 3;
+4 -4
View File
@@ -14,7 +14,7 @@ import {
StarsIcon,
TimerIcon,
} from 'lucide-react';
import { File, Files } from '@fuma-docs/ui/components/files';
import { File, Files } from 'fumadocs-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/@fuma-docs/ui-template"
href="https://githubbox.com/fuma-nama/fumadocs-ui-template"
rel="noreferrer noopener"
className={cn(
buttonVariants({
@@ -406,7 +406,7 @@ function Integration({
<CodeBlock
className="mt-2"
lang="bash"
code="pnpm create fuma-docs-app"
code="pnpm create fumadocs-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/@fuma-docs/ui-template"
href="https://githubbox.com/fuma-nama/fumadocs-ui-template"
className={cn(
buttonVariants({
size: 'lg',
+1 -1
View File
@@ -11,7 +11,7 @@ export const metadata = createMetadata({
title: 'Showcase',
description: 'Some cool websites using Fumadocs',
openGraph: {
url: 'https://fuma-docs.vercel.app/showcase',
url: 'https://fumadocs.vercel.app/showcase',
},
});
+2 -2
View File
@@ -11,12 +11,12 @@ interface Mode {
const modes: Mode[] = [
{
param: 'headless',
package: 'fuma-docs/core',
package: 'fumadocs-core',
name: 'Core',
},
{
param: 'ui',
package: 'fuma-docs/ui',
package: 'fumadocs-ui',
name: 'UI',
},
];
+2 -2
View File
@@ -1,7 +1,7 @@
import { ExternalLinkIcon } from 'lucide-react';
import type { Metadata } from 'next';
import { Card, Cards } from '@fuma-docs/ui/mdx/card';
import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
import { Card, Cards } from 'fumadocs-ui/mdx/card';
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
import { utils, type Page } from '@/utils/source';
import { createMetadata } from '@/utils/metadata';
+1 -1
View File
@@ -1,4 +1,4 @@
import { DocsLayout } from '@fuma-docs/ui/layout';
import { DocsLayout } from 'fumadocs-ui/layout';
import type { ReactNode } from 'react';
import { LayoutTemplateIcon } from 'lucide-react';
import { utils } from '@/utils/source';
+1 -1
View File
@@ -1,6 +1,6 @@
'use client';
import { RootProvider } from '@fuma-docs/ui/provider';
import { RootProvider } from 'fumadocs-ui/provider';
import dynamic from 'next/dynamic';
import type { ReactNode } from 'react';
+11 -11
View File
@@ -1,15 +1,15 @@
import { HomeIcon } from 'lucide-react';
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 { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
import { Callout } from 'fumadocs-ui/components/callout';
import { File, Files } from 'fumadocs-ui/components/files';
import { ImageZoom } from 'fumadocs-ui/components/image-zoom';
import { InlineTOC } from 'fumadocs-ui/components/inline-toc';
import { RollButton } from 'fumadocs-ui/components/roll-button';
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { TypeTable } from 'fumadocs-ui/components/type-table';
import { Card } from 'fumadocs-ui/mdx/card';
import { Heading } from 'fumadocs-ui/mdx/heading';
import type { ReactNode } from 'react';
import BannerImage from '@/public/banner.png';
import { Wrapper } from './wrapper';
+2 -2
View File
@@ -2,8 +2,8 @@
import algo from 'algoliasearch/lite';
import { cva } from 'class-variance-authority';
import type { SharedProps } from '@fuma-docs/ui/components/dialog/search';
import SearchDialog from '@fuma-docs/ui/components/dialog/search-algolia';
import type { SharedProps } from 'fumadocs-ui/components/dialog/search';
import SearchDialog from 'fumadocs-ui/components/dialog/search-algolia';
import { useEffect, useState } from 'react';
import { modes } from '@/utils/modes';
import { cn } from '@/utils/cn';
+1 -1
View File
@@ -1,4 +1,4 @@
import { Pre } from '@fuma-docs/ui/mdx/pre';
import { Pre } from 'fumadocs-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 '@fuma-docs/core/breadcrumb'
import { useBreadcrumb } from 'fumadocs-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 '@fuma-docs/core/link';
import Link from 'fumadocs-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 '@fuma-docs/core/dynamic-link';
import { DynamicLink } from 'fumadocs-core/dynamic-link';
<DynamicLink href="/[lang]/components">Click Me</DynamicLink>
```
@@ -9,7 +9,7 @@ automatically.
## Usage
```tsx
import * as Base from '@fuma-docs/core/sidebar';
import * as Base from 'fumadocs-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 '@fuma-docs/core/toc';
import * as Base from 'fumadocs-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 '@fuma-docs/core/toc';
import { useActiveAnchor } from 'fumadocs-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 '@fuma-docs/core/contentlayer/configuration';
import { defaultConfig } from 'fumadocs-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 '@fuma-docs/core/contentlayer';
import { loader } from '@fuma-docs/core/source';
import { createContentlayerSource } from 'fumadocs-core/contentlayer';
import { loader } from 'fumadocs-core/source';
export const docs = loader({
baseUrl: '/docs',
+3 -3
View File
@@ -5,7 +5,7 @@ description: Getting started with core library
## Introduction
`fuma-docs/core` is the core of Fumadocs. It makes developing a Next.js docs easier, built for
`fumadocs-core` is the core of Fumadocs. It makes developing a Next.js docs easier, built for
App Router. It offers server-side functions and headless components.
- Search (built-in: Flexsearch, Algolia Search)
@@ -17,7 +17,7 @@ App Router. It offers server-side functions and headless components.
</Callout>
```package-install
@fuma-docs/core
fumadocs-core
```
## Setup
@@ -28,7 +28,7 @@ It has native support for [Fumadocs MDX](/docs/mdx) and ContentLayer, but any ki
sources are allowed.
You can refer to this [guide](/docs/headless/contentlayer) to learn how to
use Contentlayer with `fuma-docs/core`.
use Contentlayer with `fumadocs-core`.
### Build Page Tree
@@ -23,7 +23,7 @@ export const languages = ['en', 'cn'];
```ts title="source.ts"
import { languages } from '@/i18n';
import { map } from '@/.map';
import { loader } from '@fuma-docs/core/source';
import { loader } from 'fumadocs-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 '@fuma-docs/core/middleware';
import { createI18nMiddleware } from 'fumadocs-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 '@fuma-docs/core/mdx-plugins';
import { remarkDynamicContent } from 'fumadocs-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 '@fuma-docs/core/mdx-plugins'
import { remarkInstall } from 'fumadocs-core/mdx-plugins'
const config = {
remarkPlugins: [
@@ -1,6 +1,6 @@
---
title: Structurize
description: Extract information from your documents
description: Extract information from your documents, useful for implementing document search
---
## Usage
@@ -8,7 +8,7 @@ description: Extract information from your documents
Add it as a remark plugin.
```ts
import { remarkStructure } from '@fuma-docs/core/mdx-plugins';
import { remarkStructure } from 'fumadocs-core/mdx-plugins';
export default {
remarkPlugins: [remarkStructure],
@@ -44,3 +44,35 @@ array, each item contains a `heading` prop indicating the heading of paragraph.
| --------- | ------------------------------- |
| `heading` | Heading of paragraph (nullable) |
| `content` | Text content |
## As a Function
Accepts MDX/markdown content and return structurized data.
```ts
import { structure } from 'fumadocs-core/mdx-plugins';
structure(page.body.raw);
```
<Callout title="Tip" className="mt-4">
If you have custom remark plugins enabled, such as
`remark-math`, you have to manually structurize the document with these
plugins passed into the function:
```ts
import { structure } from 'fumadocs-core/mdx-plugins';
import remarkMath from 'remark-math';
structure(page.body.raw, [remarkMath]);
```
</Callout>
### Parameters
| Parameter | |
| --------------- | ---------------------- |
| `content` | MDX/markdown content |
| `remarkPlugins` | List of remark plugins |
| `options` | Custom options |
+1 -1
View File
@@ -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 '@fuma-docs/core/mdx-plugins';
import { remarkHeading } from 'fumadocs-core/mdx-plugins';
export default {
remarkPlugins: [remarkHeading],
+1 -1
View File
@@ -14,7 +14,7 @@
"search",
"---Sources---",
"source-api",
"@fuma-docs/mdx",
"fumadocs-mdx",
"contentlayer"
]
}
@@ -91,7 +91,7 @@ export const tree = [
You can import the type from server package.
```ts
import type { PageTree } from '@fuma-docs/core/server'
import type { PageTree } from 'fumadocs-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 '@fuma-docs/core/search-algolia/server'
import { structure } from '@fuma-docs/core/mdx-plugins'
import { sync } from 'fumadocs-core/search-algolia/server'
import { structure } from 'fumadocs-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 '@fuma-docs/core/search-algolia/client'
import { useAlgoliaSearch } from 'fumadocs-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 '@fuma-docs/core/search/server';
import { createSearchAPI } from 'fumadocs-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 '@fuma-docs/core/search/client';
import { useDocsSearch } from 'fumadocs-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 '@fuma-docs/core/search/server';
import { createI18nSearchAPI } from 'fumadocs-core/search/server';
export const { GET } = createI18nSearchAPI('advanced', {
indexes: languages.map((lang) => {
@@ -118,7 +118,7 @@ function Dialog() {
Returns a more detailed result with matching headings and contents.
It accepts structured data procesed from a markdown/MDX document, and index it with
Flexsearch. You can extract the structured data using the [Structure](/docs/headless/mdx/structure) remark plugin or [`structure()`](/docs/headless/utils/structure) function.
Flexsearch. You can extract the structured data using the [Structure](/docs/headless/mdx/structure) remark plugin.
Notice that it cannot extract content from rehype-specific content (remark plugins are supported)
@@ -128,7 +128,7 @@ Same as simple search, but requires the `structuredData` property.
```ts
import { allDocs } from 'contentlayer/generated';
import { createSearchAPI } from '@fuma-docs/core/search/server';
import { createSearchAPI } from 'fumadocs-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 '@fuma-docs/core/search/server';
import { createSearchAPI } from 'fumadocs-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 '@fuma-docs/mdx';
import { loader } from '@fuma-docs/core/source';
import { createMDXSource } from 'fumadocs-mdx';
import { loader } from 'fumadocs-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 '@fuma-docs/core/source';
import { loader } from 'fumadocs-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 '@fuma-docs/core/server';
import { findNeighbour } from 'fumadocs-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 '@fuma-docs/core/server';
import { getTableOfContents } from 'fumadocs-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 '@fuma-docs/core/server';
import { getTableOfContentsFromPortableText } from 'fumadocs-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 '@fuma-docs/core/server';
import { getGitLastEditTime } from 'fumadocs-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 '@fuma-docs/core/server'
import { getGitLastEditTime } from 'fumadocs-core/server'
const time = await getGithubLastEdit({
...,
@@ -1,42 +0,0 @@
---
title: Structure
description: Extract information from your documents
---
## Usage
Accepts MDX/markdown content and return structurized data. Useful for
implementing document search.
```ts
import { structure } from '@fuma-docs/core/mdx-plugins';
structure(page.body.raw);
```
<Callout title="Tip" className="mt-4">
If you have custom remark plugins enabled, such as
`remark-math`, you have to manually structurize the document with these
plugins passed into the function:
```ts
import { structure } from '@fuma-docs/core/mdx-plugins';
import remarkMath from 'remark-math';
structure(page.body.raw, [remarkMath]);
```
</Callout>
### Parameters
| Parameter | |
| --------------- | ---------------------- |
| `content` | MDX/markdown content |
| `remarkPlugins` | List of remark plugins |
| `options` | Custom options |
### Output
[`StructuredData`](/docs/headless/mdx/structure#output) is returned by the
function.
+6 -6
View File
@@ -5,7 +5,7 @@ description: Learn how to use Fumadocs MDX in your documentation
## Introduction
`fuma-docs/mdx` is a Next.js plugin that enhances the experience of the official
`fumadocs-mdx` is a Next.js plugin that enhances the experience of the official
`next/mdx` package. It parses frontmatter and is bundled with several MDX
plugins for building a good documentation site.
@@ -16,7 +16,7 @@ plugins for building a good documentation site.
### Install Dependencies
```package-install
@fuma-docs/mdx @types/mdx
fumadocs-mdx @types/mdx
```
### Configuration
@@ -24,7 +24,7 @@ plugins for building a good documentation site.
Add this to your `next.config.mjs` file:
```js
import createMDX from '@fuma-docs/mdx/config';
import createMDX from 'fumadocs-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 '@fuma-docs/ui/mdx/default';
import defaultComponents from 'fumadocs-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 '@fuma-docs/mdx';
import { loader } from '@fuma-docs/core/source';
import { createMDXSource } from 'fumadocs-mdx';
import { loader } from 'fumadocs-core/source';
export const { getPage, getPages, pageTree } = loader({
baseUrl: '/docs',
+1 -1
View File
@@ -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 '@fuma-docs/mdx/config';
import createMDX from 'fumadocs-mdx/config';
const withMDX = createMDX({
mdxOptions: {
+3 -3
View File
@@ -22,9 +22,9 @@ option.
Extend the default frontmatter schema:
```ts title="source.ts"
import { createMDXSource, defaultSchemas } from '@fuma-docs/mdx';
import { createMDXSource, defaultSchemas } from 'fumadocs-mdx';
import { z } from 'zod';
import { loader } from '@fuma-docs/core/source';
import { loader } from 'fumadocs-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 '@fuma-docs/core/source';
import type { InferMetaType, InferPageType } from 'fumadocs-core/source';
export type Page = InferPageType<typeof utils>;
export type Meta = InferMetaType<typeof utils>;
+2 -2
View File
@@ -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 '@fuma-docs/ui/layout';
import { DocsLayout } from 'fumadocs-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 '@fuma-docs/ui/layout';
import { Layout } from 'fumadocs-ui/layout';
export default function HomeLayout({ children }) {
return <Layout>{children}</Layout>;
+1 -1
View File
@@ -10,7 +10,7 @@ The default Navbar component with a sidebar toggle and search dialog trigger.
## Usage
```tsx
import { Nav as OriginalNav } from '@fuma-docs/ui/nav';
import { Nav as OriginalNav } from 'fumadocs-ui/nav';
export function Nav() {
return <OriginalNav title="My App" enableSidebar collapsibleSidebar />;
+2 -2
View File
@@ -9,7 +9,7 @@ Footer, and Breadcrumb.
## Usage
```mdx
import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
<DocsPage>
<DocsBody>...</DocsBody>
@@ -46,7 +46,7 @@ import { DocsPage, DocsBody } from '@fuma-docs/ui/page';
To apply the [Typography](/docs/ui/theme#typography) styles, wrap your content in the `DocsBody` component.
```mdx
import { DocsBody } from '@fuma-docs/ui/page';
import { DocsBody } from 'fumadocs-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 '@fuma-docs/ui/provider';
import { RootProvider } from 'fumadocs-ui/provider';
export default function Layout({ children }) {
return (
@@ -11,21 +11,21 @@ No arguments needed.
<Tab value="npm">
```bash
npm create fuma-docs-app
npm create fumadocs-app
```
</Tab>
<Tab value="pnpm">
```bash
pnpm create fuma-docs-app
pnpm create fumadocs-app
```
</Tab>
<Tab value="yarn">
```bash
yarn create fuma-docs-app
yarn create fumadocs-app
```
</Tab>
@@ -4,8 +4,6 @@ description: Add Accordions to your documentation
preview: accordion
---
> it is an optional component which won't be loaded by default.
## Usage
Wrap accordions in the container, a `type` property is required by default.
@@ -14,7 +12,7 @@ Based on
[Radix UI Accordion](https://www.radix-ui.com/primitives/docs/components/accordion).
```mdx
import { Accordion, Accordions } from '@fuma-docs/ui/components/accordion';
import { Accordion, Accordions } from 'fumadocs-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 '@fuma-docs/ui/mdx/card';
import { Card, Cards } from 'fumadocs-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 '@fuma-docs/ui/mdx/pre';
import { Pre } from 'fumadocs-ui/mdx/pre';
<MDX
components={{
@@ -4,14 +4,12 @@ description: Display file structure in your documentation
preview: 'files'
---
> it is an optional component which won't be loaded by default.
## Usage
Wrap file components in `Files`.
```mdx
import { File, Files } from '@fuma-docs/ui/components/files';
import { File, Files } from 'fumadocs-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 '@fuma-docs/ui/mdx/heading';
import { Heading } from 'fumadocs-ui/mdx/heading';
<MDX
components={{
@@ -4,8 +4,6 @@ description: Allow zoom-in images in your documentation
preview: zoom-image
---
> it is an optional component which won't be loaded by default.
## Usage
Add it to your MDX components.
@@ -13,7 +11,7 @@ Add it to your MDX components.
> A default `sizes` property will be defined if not specified
```tsx
import { ImageZoom } from '@fuma-docs/ui/components/image-zoom';
import { ImageZoom } from 'fumadocs-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 '@fuma-docs/ui/components/inline-toc';
import { InlineTOC } from 'fumadocs-ui/components/inline-toc';
<InlineTOC items={toc} />
```
+2 -2
View File
@@ -10,11 +10,11 @@ The default components include [Card](/docs/ui/components/card), [Code Block](/d
For Client Components:
```ts
import defaultComponents from '@fuma-docs/ui/mdx/default-client';
import defaultComponents from 'fumadocs-ui/mdx/default-client';
```
For Server Components:
```ts
import defaultComponents from '@fuma-docs/ui/mdx/default';
import defaultComponents from 'fumadocs-ui/mdx/default';
```
@@ -6,14 +6,12 @@ preview: roll-button
A button that scrolls to the top.
> It is an optional component which won't be loaded by default.
## Usage
Add this component to your page.
```mdx title="app/docs/[[...slug]]/page.tsx"
import { RollButton } from '@fuma-docs/ui/components/roll-button';
import { RollButton } from 'fumadocs-ui/components/roll-button';
<DocsPage toc={toc}>
<RollButton />
@@ -4,14 +4,12 @@ description: Adding steps to your docs
preview: steps
---
> it is an optional component which won't be loaded by default.
## Usage
Put your steps into the `Steps` container.
```mdx
import { Step, Steps } from '@fuma-docs/ui/components/steps';
import { Step, Steps } from 'fumadocs-ui/components/steps';
<Steps>
<Step>
@@ -6,14 +6,12 @@ description:
preview: tabs
---
> it is an optional component which won't be loaded by default.
## Usage
Import it in your MDX documents.
```mdx
import { Tab, Tabs } from '@fuma-docs/ui/components/tabs';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
<Tabs items={['Javascript', 'Rust']}>
<Tab value="Javascript">Javascript is weird</Tab>
@@ -63,7 +61,7 @@ Set a default value by passing `defaultIndex`.
You can use the styled Radix UI primitive directly from exported `Primitive`.
```mdx
import { Primitive } from '@fuma-docs/ui/components/tabs';
import { Primitive } from 'fumadocs-ui/components/tabs';
<Primitive.Tabs>
<Primitive.TabsList>
@@ -4,14 +4,12 @@ description: A table for documenting types
preview: type-table
---
> it is an optional component which won't be loaded by default.
## Usage
It accepts a `type` property.
```mdx
import { TypeTable } from '@fuma-docs/ui/components/type-table';
import { TypeTable } from 'fumadocs-ui/components/type-table';
<TypeTable
type={{
+9 -9
View File
@@ -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-fuma-docs-app`.
Create a new app with `create-fumadocs-app`.
```bash
npx create-fuma-docs-app
npx create-fumadocs-app
# or
pnpm create fuma-docs-app
pnpm create fumadocs-app
# or
yarn create fuma-docs-app
yarn create fumadocs-app
```
## Manual Installation
@@ -23,7 +23,7 @@ yarn create fuma-docs-app
Create a new Next.js application with `create-next-app`, and install required packages.
```package-install
@fuma-docs/ui @fuma-docs/core
fumadocs-ui fumadocs-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 '@fuma-docs/ui/style.css';
import 'fumadocs-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 '@fuma-docs/ui/provider';
import { RootProvider } from 'fumadocs-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 '@fuma-docs/ui/layout';
import { DocsLayout } from 'fumadocs-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/@fuma-docs/ui-template).
Open in [CodeSandbox](https://githubbox.com/fuma-nama/fumadocs-ui-template).
## Learn More
@@ -19,8 +19,8 @@ Put your pages and layouts under `/app/[lang]`, where the 'lang' parameter is at
Then, wrap the root provider inside of your i18n provider.
```tsx
import { RootProvider } from '@fuma-docs/ui/provider';
import { I18nProvider } from '@fuma-docs/ui/i18n';
import { RootProvider } from 'fumadocs-ui/provider';
import { I18nProvider } from 'fumadocs-ui/i18n';
import type { ReactNode } from 'react';
export default function RootLayout({ children }: { children: ReactNode }) {
@@ -53,7 +53,7 @@ To allow users changing their language, you can add a `<LanguageSelect />`
component to your UI, for example, as sidebar footer.
```tsx title="[lang]/docs/layout.tsx"
import { LanguageSelect } from '@fuma-docs/ui/i18n';
import { LanguageSelect } from 'fumadocs-ui/i18n';
export function DocsLayout({ children }: { children: ReactNode }) {
return <LanguageSelect />;
+1 -1
View File
@@ -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 '@fuma-docs/mdx/config';
import createNextDocs from 'fumadocs-mdx/config';
import rehypeKatex from 'rehype-katex';
import remarkMath from 'remark-math';
+3 -3
View File
@@ -4,9 +4,9 @@ description: Special events hosted by the Museum
toc: false
---
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';
import { Root, API, APIInfo, APIExample, Property } from 'fumadocs-ui/components/api'
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Root>
@@ -4,9 +4,9 @@ description: Operational information about the museum.
toc: false
---
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';
import { Root, API, APIInfo, APIExample, Property } from 'fumadocs-ui/components/api'
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Root>
+3 -3
View File
@@ -4,9 +4,9 @@ description: Museum tickets for general entrance or special events.
toc: false
---
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';
import { Root, API, APIInfo, APIExample, Property } from 'fumadocs-ui/components/api'
import { Tabs, Tab } from 'fumadocs-ui/components/tabs'
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Root>
+3 -3
View File
@@ -8,14 +8,14 @@ description: Generating docs for OpenAPI schema
Install the required packages.
```package-install
@fuma-docs/openapi
fumadocs-openapi
```
Create configuration file:
```js title="openapi.config.js"
/**
* @type {import("@fuma-docs/openapi").Config}
* @type {import("fumadocs-openapi").Config}
*/
module.exports = {
input: ['./petstore.yaml'],
@@ -30,7 +30,7 @@ module.exports = {
Generate docs with a command:
```bash
pnpm fuma-docs-openapi
pnpm fumadocs-openapi
```
### Demo
+5 -5
View File
@@ -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
`@fuma-docs/ui/components/dialog/search-algolia`.
`fumadocs-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 '@fuma-docs/ui/components/dialog/search';
import SearchDialog from '@fuma-docs/ui/components/dialog/search-algolia';
import type { SharedProps } from 'fumadocs-ui/components/dialog/search';
import SearchDialog from 'fumadocs-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 '@fuma-docs/ui/provider';
import { RootProvider } from 'fumadocs-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 '@fuma-docs/ui/components/dialog/search'
} from 'fumadocs-ui/components/dialog/search'
export default function CustomSearchDialog(props: SharedProps) { ... }
```
+5 -5
View File
@@ -12,7 +12,7 @@ import { blueTheme } from '@/components/themes.js';
You can import the pre-built stylesheet.
```tsx
import '@fuma-docs/ui/style.css';
import 'fumadocs-ui/style.css';
```
> Notice that the stylesheet performs preflight (or normalization)
@@ -20,20 +20,20 @@ import '@fuma-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('@fuma-docs/ui/tailwind-plugin');
const { createPreset } = require('fumadocs-ui/tailwind-plugin');
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
presets: [createPreset()],
content: [
'./node_modules/@fuma-docs/ui/dist/**/*.js',
'./node_modules/fumadocs-ui/dist/**/*.js',
...
],
};
```
> Ensure all files inside `@fuma-docs/ui` are included in the `content` property.
> Ensure all files inside `fumadocs-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('@fuma-docs/ui/tailwind-plugin');
const { createPreset } = require('fumadocs-ui/tailwind-plugin');
/** @type {import('tailwindcss').Config} */
module.exports = {
+1 -1
View File
@@ -1 +1 @@
import '@fuma-docs/openapi/dist/bin.js';
import 'fumadocs-openapi/dist/bin.js';
+6 -6
View File
@@ -1,10 +1,10 @@
import type { MDXComponents } from 'mdx/types';
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 { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
import { Callout } from 'fumadocs-ui/components/callout';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { TypeTable } from 'fumadocs-ui/components/type-table';
import defaultComponents from 'fumadocs-ui/mdx/default';
import { Pre } from 'fumadocs-ui/mdx/pre';
import type { ReactNode } from 'react';
import { Wrapper } from '@/components/preview/wrapper';
+2 -5
View File
@@ -1,9 +1,6 @@
import createBundleAnalyzer from '@next/bundle-analyzer';
import createNextDocs from '@fuma-docs/mdx/config';
import {
remarkDynamicContent,
remarkInstall,
} from '@fuma-docs/core/mdx-plugins';
import createNextDocs from 'fumadocs-mdx/config';
import { remarkDynamicContent, remarkInstall } from 'fumadocs-core/mdx-plugins';
import rehypeKatex from 'rehype-katex';
import remarkMath from 'remark-math';
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @type {import("@fuma-docs/openapi").Config}
* @type {import("fumadocs-openapi").Config}
*/
module.exports = {
input: ['./museum.yaml'],
+4 -4
View File
@@ -12,13 +12,13 @@
"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",
"clsx": "^2.0.0",
"fumadocs-core": "workspace:*",
"fumadocs-mdx": "workspace:*",
"fumadocs-ui": "workspace:*",
"geist": "^1.2.0",
"katex": "^0.16.8",
"lucide-react": "^0.298.0",
@@ -33,7 +33,6 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@fuma-docs/openapi": "workspace:^",
"@next/bundle-analyzer": "^14.0.0",
"@next/eslint-plugin-next": "^14.0.0",
"@types/mdx": "^2.0.8",
@@ -42,6 +41,7 @@
"@types/react-dom": "18.2.1",
"autoprefixer": "10.4.17",
"eslint-config-custom": "workspace:*",
"fumadocs-openapi": "workspace:^",
"glslify": "^7.1.1",
"glslx": "^0.3.0",
"postcss": "8.4.33",
+2 -2
View File
@@ -1,6 +1,6 @@
User-agent: *
Allow: /
Host: https://fuma-docs.vercel.app
Host: https://fumadocs.vercel.app
Sitemap: https://fuma-docs.vercel.app/sitemap.xml
Sitemap: https://fumadocs.vercel.app/sitemap.xml
+2 -2
View File
@@ -1,4 +1,4 @@
const { createPreset } = require('@fuma-docs/ui/tailwind-plugin');
const { createPreset } = require('fumadocs-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/@fuma-docs/ui/dist/**/*.js',
'./node_modules/fumadocs-ui/dist/**/*.js',
],
presets: [createPreset()],
theme: {
+1 -1
View File
@@ -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 '@fuma-docs/core/search-algolia/server';
import { sync } from 'fumadocs-core/search-algolia/server';
env.loadEnvConfig(process.cwd());
+1 -1
View File
@@ -6,7 +6,7 @@ export function createMetadata(override: Metadata): Metadata {
openGraph: {
title: override.title ?? undefined,
description: override.description ?? undefined,
url: 'https://fuma-docs.vercel.app',
url: 'https://fumadocs.vercel.app',
images: '/banner.png',
siteName: 'Fumadocs',
...override.openGraph,
+3 -3
View File
@@ -22,7 +22,7 @@ export const modes: Mode[] = [
{
param: 'headless',
name: 'Core',
package: 'fuma-docs/core',
package: 'fumadocs-core',
description: 'The core library',
version: zeta.version,
icon: LibraryIcon,
@@ -30,7 +30,7 @@ export const modes: Mode[] = [
{
param: 'ui',
name: 'UI',
package: 'fuma-docs/ui',
package: 'fumadocs-ui',
description: 'The user interface',
version: ui.version,
icon: LayoutIcon,
@@ -38,7 +38,7 @@ export const modes: Mode[] = [
{
param: 'mdx',
name: 'MDX',
package: 'fuma-docs/mdx',
package: 'fumadocs-mdx',
description: 'Built-in source provider',
version: mdx.version,
icon: PaperclipIcon,
+4 -4
View File
@@ -1,11 +1,11 @@
import { writeFileSync } from 'node:fs';
import path from 'node:path';
import { createMDXSource, defaultSchemas } from '@fuma-docs/mdx';
import type { StructuredData } from '@fuma-docs/core/mdx-plugins';
import { createMDXSource, defaultSchemas } from 'fumadocs-mdx';
import type { StructuredData } from 'fumadocs-core/mdx-plugins';
import { PHASE_PRODUCTION_BUILD } from 'next/constants';
import { z } from 'zod';
import type { InferMetaType, InferPageType } from '@fuma-docs/core/source';
import { loader } from '@fuma-docs/core/source';
import type { InferMetaType, InferPageType } from 'fumadocs-core/source';
import { loader } from 'fumadocs-core/source';
import { icons } from 'lucide-react';
import { map } from '@/.map';
import { create } from '@/components/ui/icon';
+1 -1
View File
@@ -1,5 +1,5 @@
import { getPages } from '@/app/source';
import { createSearchAPI } from '@fuma-docs/core/search/server';
import { createSearchAPI } from 'fumadocs-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 '@fuma-docs/ui/mdx/default-client';
import defaultComponents from 'fumadocs-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 '@fuma-docs/ui/page';
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
export default async function Page({
+1 -1
View File
@@ -1,5 +1,5 @@
import { pageTree } from '../source';
import { DocsLayout } from '@fuma-docs/ui/layout';
import { DocsLayout } from 'fumadocs-ui/layout';
import type { ReactNode } from 'react';
export default function RootDocsLayout({ children }: { children: ReactNode }) {
+1 -1
View File
@@ -1,5 +1,5 @@
import './global.css';
import { RootProvider } from '@fuma-docs/ui/provider';
import { RootProvider } from 'fumadocs-ui/provider';
import { Inter } from 'next/font/google';
import type { ReactNode } from 'react';
+2 -2
View File
@@ -1,6 +1,6 @@
import { allDocs, allMeta } from 'contentlayer/generated';
import { createContentlayerSource } from '@fuma-docs/core/contentlayer';
import { loader } from '@fuma-docs/core/source';
import { createContentlayerSource } from 'fumadocs-core/contentlayer';
import { loader } from 'fumadocs-core/source';
export const { pageTree, getPages, getPage } = loader({
baseUrl: '/docs',
+1 -1
View File
@@ -9,7 +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://fuma-docs.vercel.app" />
<Card title="Learn more about Fumadocs" href="https://fumadocs.vercel.app" />
</Cards>
### Heading
+1 -1
View File
@@ -9,7 +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://fuma-docs.vercel.app" />
<Card title="Learn more about Fumadocs" href="https://fumadocs.vercel.app" />
</Cards>
### Heading
+1 -1
View File
@@ -1,4 +1,4 @@
import { makeSource } from 'contentlayer/source-files';
import { defaultConfig } from '@fuma-docs/core/contentlayer/configuration';
import { defaultConfig } from 'fumadocs-core/contentlayer/configuration';
export default makeSource(defaultConfig);
+2 -2
View File
@@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@fuma-docs/core": "7.1.2",
"@fuma-docs/ui": "7.1.2",
"contentlayer": "0.3.4",
"fumadocs-core": "7.1.2",
"fumadocs-ui": "7.1.2",
"next": "14.0.4",
"next-contentlayer": "0.3.4",
"react": "18.2.0",
+2 -2
View File
@@ -1,4 +1,4 @@
const { docsUi, docsUiPlugins } = require('@fuma-docs/ui/tailwind-plugin');
const { docsUi, docsUiPlugins } = require('fumadocs-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/@fuma-docs/ui/dist/**/*.js',
'./node_modules/fumadocs-ui/dist/**/*.js',
],
plugins: [...docsUiPlugins, docsUi],
};
+1 -1
View File
@@ -1,5 +1,5 @@
import { getPages } from '@/app/source';
import { createSearchAPI } from '@fuma-docs/core/search/server';
import { createSearchAPI } from 'fumadocs-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 '@fuma-docs/ui/page';
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
export default async function Page({
+1 -1
View File
@@ -1,5 +1,5 @@
import { pageTree } from '../source';
import { DocsLayout } from '@fuma-docs/ui/layout';
import { DocsLayout } from 'fumadocs-ui/layout';
import type { ReactNode } from 'react';
export default function RootDocsLayout({ children }: { children: ReactNode }) {
+2 -2
View File
@@ -1,5 +1,5 @@
import { RootProvider } from '@fuma-docs/ui/provider';
import '@fuma-docs/ui/style.css';
import { RootProvider } from 'fumadocs-ui/provider';
import 'fumadocs-ui/style.css';
import { Inter } from 'next/font/google';
import type { ReactNode } from 'react';
+2 -2
View File
@@ -1,6 +1,6 @@
import { map } from '@/.map';
import { createMDXSource } from '@fuma-docs/mdx';
import { loader } from '@fuma-docs/core/source';
import { createMDXSource } from 'fumadocs-mdx';
import { loader } from 'fumadocs-core/source';
export const { getPage, getPages, pageTree } = loader({
baseUrl: '/docs',
+1 -1
View File
@@ -9,7 +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://fuma-docs.vercel.app" />
<Card title="Learn more about Fumadocs" href="https://fumadocs.vercel.app" />
</Cards>
### Heading
+1 -1
View File
@@ -9,7 +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://fuma-docs.vercel.app" />
<Card title="Learn more about Fumadocs" href="https://fumadocs.vercel.app" />
</Cards>
### Heading
+1 -1
View File
@@ -1,5 +1,5 @@
import type { MDXComponents } from 'mdx/types';
import defaultComponents from '@fuma-docs/ui/mdx/default';
import defaultComponents from 'fumadocs-ui/mdx/default';
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
+1 -1
View File
@@ -1,4 +1,4 @@
import createNextDocsMDX from '@fuma-docs/mdx/config';
import createNextDocsMDX from 'fumadocs-mdx/config';
const withFumaMDX = createNextDocsMDX();
+3 -3
View File
@@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@fuma-docs/core": "7.1.2",
"@fuma-docs/mdx": "7.1.2",
"@fuma-docs/ui": "7.1.2",
"fumadocs-core": "7.1.2",
"fumadocs-mdx": "7.1.2",
"fumadocs-ui": "7.1.2",
"next": "14.0.4",
"react": "18.2.0",
"react-dom": "18.2.0"
+1 -1
View File
@@ -1,5 +1,5 @@
import { getPages } from '@/app/source';
import { createSearchAPI } from '@fuma-docs/core/search/server';
import { createSearchAPI } from 'fumadocs-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 '@fuma-docs/ui/mdx/default-client';
import defaultComponents from 'fumadocs-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 '@fuma-docs/ui/page';
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
export default async function Page({
+1 -1
View File
@@ -1,5 +1,5 @@
import { pageTree } from '../source';
import { DocsLayout } from '@fuma-docs/ui/layout';
import { DocsLayout } from 'fumadocs-ui/layout';
import type { ReactNode } from 'react';
export default function RootDocsLayout({ children }: { children: ReactNode }) {

Some files were not shown because too many files have changed in this diff Show More