fumadocs

The beautiful docs framework for Next.js. Alternative to Nextra

MIT License

Downloads
173.3K
Stars
1.5K
Committers
34

Bot releases are visible (Hide)

fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

  • 3840ad6: Update to 6.0.0
fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Major Changes

  • 983ede8: Remove not-found component

    The not-found component was initially intended to be the default 404 page. However, we found that the Next.js default one is good enough. For advanced cases, you can always build your own 404 page.

  • ebe8d9f: Support Tailwind CSS plugin usage

    If you are using Tailwind CSS for your docs, it's now recommended to use the official plugin instead.

    const { docsUi, docsUiPlugins } = require('next-docs-ui/tailwind-plugin');
    
    /** @type {import('tailwindcss').Config} */
    module.exports = {
      darkMode: 'class',
      content: [
        './components/**/*.{ts,tsx}',
        './app/**/*.{ts,tsx}',
        './content/**/*.mdx',
        './node_modules/next-docs-ui/dist/**/*.js',
      ],
      plugins: [...docsUiPlugins, docsUi],
    };
    

    The docsUi plugin adds necessary utilities & colors, and docsUiPlugins are its dependency plugins which should not be missing.

  • 7d89e83: Add required property url to <DocsPage /> component

    You must pass the URL of current page to <DocsPage /> component.

    export default function Page({ params }) {
      return (
        <DocsPage
    +      url={page.url}
          toc={page.data.toc}
        >
          ...
        </DocsPage>
      )
    }
    

    footer property is now optional

    Your footer property in <DocsPage /> will be automatically generated if not specified.

    findNeighbour(tree, url);
    
  • 0599d50: Separate MDX components

    Previously, you can only import the code block component from next-docs-ui/mdx (Client Component) and next-docs-ui/mdx-server (Server Component).

    This may lead to confusion, hence, it is now separated into multiple files. You can import these components regardless it is either a client or a server component.

    Notice that MDXContent is now renamed to DocsBody, you must import it from next-docs-ui/page instead.

    - import { MDXContent } from "next-docs-ui/mdx"
    - import { MDXContent } from "next-docs-ui/mdx-server"
    
    + import { DocsBody } from "next-docs-ui/page"
    
    - import { Card, Cards } from "next-docs-ui/mdx"
    + import { Card, Cards } from "next-docs-ui/mdx/card"
    
    - import { Pre } from "next-docs-ui/mdx"
    + import { Pre } from "next-docs-ui/mdx/pre"
    
    - import { Heading } from "next-docs-ui/mdx"
    + import { Heading } from "next-docs-ui/mdx/heading"
    
    - import defaultComponents from "next-docs-ui/mdx"
    + import defaultComponents from "next-docs-ui/mdx/default-client"
    
    - import defaultComponents from "next-docs-ui/mdx-server"
    + import defaultComponents from "next-docs-ui/mdx/default"
    

Minor Changes

  • 56a35ce: Support custom searchOptions in Algolia Search Dialog

Patch Changes

  • 5c98f7f: Support custom attributes to pre element inside code blocks
  • Updated dependencies [9ef047d]
fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Major Changes

  • 69f8abf: Make file paths relative to rootDir when resolving files

    For a more simplified usage, the resolved file paths will be relative to rootDir.

    You can now generate slugs automatically depending on the root directory you have configured.

    const utils = fromMap(map, {
      rootDir: 'ui',
      schema: {
        frontmatter: frontmatterSchema,
      },
    });
    

    The configuration above will generate /hello slugs for a file named /content/ui/hello.mdx, while the previous one generates /ui/hello.

  • 9ef047d: Pre-bundle page urls into raw pages.

    This means you don't need getPageUrl anymore for built-in adapters, including next-docs-mdx and Contentlayer. It is now replaced by the url property from the pages array provided by your adapter.

    Due to this change, your old configuration might not continues to work.

    import { fromMap } from 'next-docs-mdx/map'
    
    fromMap({
    -  slugs: ...
    +  getSlugs: ...
    })
    

    For Contentlayer, the getUrl option is now moved to createConfig.

  • 1c187b9: Support intelligent schema types

    The validate options is now renamed to schema.

    import { defaultSchemas, fromMap } from 'next-docs-mdx/map';
    
    const utils = fromMap(map, {
      rootDir: 'docs/ui',
      baseUrl: '/docs/ui',
      schema: {
        frontmatter: defaultSchemas.frontmatter.extend({
          preview: z.string().optional(),
        }),
      },
    });
    

    The frontmatter field on pages should be automatically inferred to your Zod schema type.

  • 52b24a6: Remove /docs from default root content path

    Previously, the default root content path is ./content/docs. All your documents must be placed under the root directory.

    Since this update, it is now ./content by default. To keep the old behaviours, you may manually specify rootContentPath.

    const withNextDocs = createNextDocs({
      rootContentPath: './content/docs',
    });
    

    Notice that due to this change, your baseUrl property will be / by default

    const withNextDocs = createNextDocs({
    +  baseUrl: "/docs"
    })
    
  • 2ff7581: Rename configuration options

    The options of createNextDocs is now renamed to be more flexible and straightforward.

    Old New
    dataExports mdxOptions.valueToExport
    pluginOptions mdxOptions.rehypeNextDocsOptions

    rehypePlugins and remarkPlugins can also be a function that accepts and returns plugins.

Minor Changes

  • 55a2321: Use @mdx-js/mdx to process MDX/markdown files.

    You no longer need @next/loader and @mdx-js/loader to be installed on your project, next-docs-mdx will process files with @mdx-js/mdx directly.

    This change will not break most of the projects

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Major Changes

  • 9ef047d: Pre-bundle page urls into raw pages.

    This means you don't need getPageUrl anymore for built-in adapters, including next-docs-mdx and Contentlayer. It is now replaced by the url property from the pages array provided by your adapter.

    Due to this change, your old configuration might not continues to work.

    import { fromMap } from 'next-docs-mdx/map'
    
    fromMap({
    -  slugs: ...
    +  getSlugs: ...
    })
    

    For Contentlayer, the getUrl option is now moved to createConfig.

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Minor Changes

  • de44efe: Migrate to Shikiji
  • de44efe: Support code highlighting options

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Minor Changes

  • de44efe: Migrate to Shikiji
  • de44efe: Support code highlighting options
fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Minor Changes

  • de44efe: Migrate to Shikiji
  • de44efe: Support code highlighting options

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

  • 70545e7: Support enableThemeProvider option in RootProvider
  • Updated dependencies [a883009]
fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

  • a883009: Fix empty extracted paragraphs in remark-structure
fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

  • e0c5c96: Make ESM only
fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

  • b9af5ed: Update tsup & dependencies
fumadocs - [email protected]

Published by github-actions[bot] 11 months ago

Patch Changes

Package Rankings
Top 25.25% on Npmjs.org
Related Projects