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 fuma-nama 9 months ago

Patch Changes

  • b836055: Remove deprecated usage from templates
fumadocs - [email protected]

Published by fuma-nama 9 months ago

fumadocs - [email protected]

Published by fuma-nama 9 months ago

Patch Changes

fumadocs - [email protected]

Published by fuma-nama 9 months ago

Patch Changes

fumadocs - [email protected]

Published by fuma-nama 9 months ago

Patch Changes

  • 65f71d4: Fix picocolors import errors
fumadocs - [email protected]

Published by fuma-nama 9 months ago

Minor Changes

  • 40e51a4: Support integration with @fuma-docs/openapi
  • d2744a4: Remove tailwindcss-animate

Patch Changes

fumadocs - @fuma-docs/[email protected]

Published by fuma-nama 9 months ago

Minor Changes

  • 45a52ae: Support generating docs for OpenAPI schema

    In openapi.config.js:

    /**
     * @type {import("@fuma-docs/openapi").Config}
     */
    module.exports = {
      input: ['./petstore.yaml'],
      output: './content/docs',
      per: 'tag',
      render: (title, description) => {
        return {
          frontmatter: [
            '---',
            `title: ${title}`,
            `description: ${description}`,
            'toc: false',
            '---',
          ].join('\n'),
        };
      },
    };
    

    Run fuma-docs-openapi to generate.

fumadocs - [email protected]

Published by fuma-nama 9 months ago

Patch Changes

fumadocs - [email protected]

Published by fuma-nama 9 months ago

fumadocs - [email protected]

Published by fuma-nama 9 months ago

fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Major Changes

  • f995ad9: Page Footer is now a client component

    This allows the footer component to find items within the current page tree, which fixes the problem where a item from another page tree is appeared.

    Also removed the url and tree properties from DocsPage since we can pass them via React Context API.

    export default async function Page({ params }) {
      return (
        <DocsPage
    -      url={page.url}
    -      tree={pageTree}
        >
          ...
        </DocsPage>
      );
    }
    

    The footer property in DocsPage has also updated, now you can specify or replace the default footer component.

    <DocsPage footer={{ items: {} }}>...</DocsPage>
    

Minor Changes

  • b30d1cd: Support theme presets

    Add theme presets for the Tailwind CSS plugin, the default and ocean presets are available now.

    const { docsUi, docsUiPlugins } = require('next-docs-ui/tailwind-plugin');
    
    /** @type {import('tailwindcss').Config} */
    module.exports = {
      plugins: [
        ...docsUiPlugins,
        docsUi({
          preset: 'ocean',
        }),
      ],
    };
    
  • 9929c5b: Support multiple page tree roots

    You can specify a root property in meta.json, the nearest root folder will be used as the root of page tree instead.

    {
      "title": "Hello World",
      "root": true
    }
    

Patch Changes

  • Updated dependencies [9929c5b]
  • Updated dependencies [9929c5b]
  • Updated dependencies [49201be]
  • Updated dependencies [338ea98]
  • Updated dependencies [4c1334e]
  • Updated dependencies [9929c5b]
fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Major Changes

  • 9929c5b: Migrate Contentlayer Integration to Source API

    createContentlayer is now replaced by createContentlayerSource.

    You should configure base URL and root directory in the loader instead of Contentlayer configuration.

    It's no longer encouraged to access allDocs directly because they will not include url property anymore. Please consider getPages instead.

    import { allDocs, allMeta } from 'contentlayer/generated';
    import { createContentlayerSource } from 'next-docs-zeta/contentlayer';
    import { loader } from 'next-docs-zeta/source';
    
    export const { getPage, pageTree, getPages } = loader({
      baseUrl: '/docs',
      rootDir: 'docs',
      source: createContentlayerSource(allMeta, allDocs),
    });
    

    The interface is very similar, but you can only access Contentlayer properties from page.data.

    - <Content code={page.body.code} />
    + <Content code={page.data.body.code} />
    
  • 9929c5b: Source API

    To reduce boilerplate, the Source API is now released to handle File-system based files.

    Thanks to this, you don't have to deal with the inconsistent behaviours between different content sources anymore.

    The interface is now unified, you can easily plug in a content source.

    import { map } from '@/.map';
    import { createMDXSource } from 'next-docs-mdx';
    import { loader } from 'next-docs-zeta/source';
    
    export const { getPage, getPages, pageTree } = loader({
      baseUrl: '/docs',
      rootDir: 'docs',
      source: createMDXSource(map),
    });
    

    Page Tree Builder API is removed in favor of this

  • 49201be: Change remarkToc to remarkHeading

    The previous remarkToc plugin only extracts table of contents from documents, now it also adds the id property to all heading elements.

    - import { remarkToc } from "next-docs-zeta/mdx-plugins"
    + import { remarkHeading } from "next-docs-zeta/mdx-plugins"
    
  • 4c1334e: Improve createI18nMiddleware function

    Now, you can export the middleware directly without a wrapper.

    From:

    export default function middleware(request: NextRequest) {
      return createI18nMiddleware(...);
    }
    

    To:

    export default createI18nMiddleware({
      defaultLanguage,
      languages,
    });
    

Minor Changes

  • 338ea98: Export create function for Contentlayer configuration

    If you want to include other document types, or override the output configuration, the create function can return the fields and document types you need.

    import { create } from 'next-docs-zeta/contentlayer/configuration';
    
    const config = create(options);
    
    export default {
      contentDirPath: config.contentDirPath,
      documentTypes: [config.Docs, config.Meta],
      mdx: config.mdx,
    };
    
  • 9929c5b: Support multiple page tree roots

    You can specify a root property in meta.json, the nearest root folder will be used as the root of page tree instead.

    {
      "title": "Hello World",
      "root": true
    }
    
fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Major Changes

  • 9929c5b: Prefer .map.ts instead of _map.ts

    Unless you have especially configured, now it uses .map.ts by default.

    - import map from "@/_map"
    + import map from "@/.map"
    
  • 9929c5b: Migrate to Source API

    fromMap has been removed. Please use createMDXSource instead.

    import { map } from '@/.map';
    import { createMDXSource } from 'next-docs-mdx';
    import { loader } from 'next-docs-zeta/source';
    
    export const { getPage, getPages, pageTree } = loader({
      baseUrl: '/docs',
      rootDir: 'docs',
      source: createMDXSource(map),
    });
    

Minor Changes

  • 8fd769f: Support last modified timestamp for Git

    Enable this in next.config.mjs:

    const withNextDocs = createNextDocs({
      mdxOptions: {
        lastModifiedTime: 'git',
      },
    });
    

    Access it via page.data.exports.lastModified.

Patch Changes

  • Updated dependencies [9929c5b]
  • Updated dependencies [9929c5b]
  • Updated dependencies [49201be]
  • Updated dependencies [338ea98]
  • Updated dependencies [4c1334e]
  • Updated dependencies [9929c5b]
fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Major Changes

  • 579ecaa: Support template for Tailwind CSS + Next Docs MDX
fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Minor Changes

  • 6e0d2e1: Support Layout for non-docs pages (without page tree)

    Same as Docs Layout but doesn't include a sidebar. It can be used outside of the docs, a page tree is not required.

    import { Layout } from 'next-docs-ui/layout';
    
    export default function HomeLayout({ children }) {
      return <Layout>{children}</Layout>;
    }
    

    nav.items prop is deprecated

    It is now replaced by links.

  • 2a82e9d: Support linking to accordions

    You can now specify an id for accordion. The accordion will automatically open when the user is navigating to the page with the specified id in hash parameter.

    <Accordions>
    <Accordion title="My Title" id="my-title">
    
    My Content
    
    </Accordion>
    </Accordions>
    

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Minor Changes

  • f39ae40: Forward ref to Link and DynamicLink component

    Legacy import name SafeLink is now removed

    - import { SafeLink } from "next-docs-zeta/link"
    + import Link from "next-docs-zeta/link"
    
fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Patch Changes

  • 65b7f30: Update examples
  • 3e34d14: Sync version with next-docs
fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Patch Changes

fumadocs - [email protected]

Published by github-actions[bot] 10 months ago

Patch Changes

Package Rankings
Top 25.25% on Npmjs.org
Related Projects