github fuma-nama/fumadocs fumadocs-ui@8.0.0

latest releases: fumadocs-core@15.7.12, fumadocs-openapi@9.3.9, create-fumadocs-app@15.7.12...
20 months ago

Major Changes

  • a2f4819: Improve internationalized routing

    I18nProvider now handles routing for you.
    Therefore, locale and onChange is no longer required.

    <I18nProvider
      translations={{
        cn: {
          name: 'Chinese', // required
          search: 'Translated Content',
        },
      }}
    ></I18nProvider>

    LanguageSelect detects available options from your translations, therefore, the languages prop is removed.

  • c608ad2: Remove deprecated docsUiPlugins

    migrate: Use createPreset instead

    const { createPreset } = require('fumadocs-ui/tailwind-plugin');
    
    /** @type {import('tailwindcss').Config} */
    module.exports = {
      content: [
        './components/**/*.{ts,tsx}',
        './app/**/*.{ts,tsx}',
        './content/**/*.mdx',
        './node_modules/fumadocs-ui/dist/**/*.js',
      ],
      presets: [createPreset()],
    };
  • 2ea9437: Change usage of Code Block component

    The inner pre element is now separated from code block container, making it easier to customise.`

    Before:

    import { CodeBlock, Pre } from 'fumadocs-ui/mdx/pre';
    
    <Pre title={title} allowCopy {...props} />;

    After:

    import { CodeBlock, Pre } from 'fumadocs-ui/components/codeblock';
    
    <CodeBlock title={title} allowCopy>
      <Pre {...props} />
    </CodeBlock>;
  • ac424ec: Update import paths of MDX components

    why: To improve consistency, all MDX components are located in /components/* instead.

    migrate:

    - import { Card, Cards } from "fumadocs-ui/mdx/card"
    + import { Card, Cards } from "fumadocs-ui/components/card"
    
    - import { Heading } from "fumadocs-ui/mdx/heading"
    + import { Heading } from "fumadocs-ui/components/heading"
    
    - import { Codeblock, Pre } from "fumadocs-ui/mdx/pre"
    + import { Codeblock, Pre } from "fumadocs-ui/components/codeblock"
  • 2b11c20: Rename to Fumadocs

    next-docs-zeta -> fumadocs-core

    next-docs-ui -> fumadocs-ui

    next-docs-mdx -> fumadocs-mdx

    @fuma-docs/openapi -> fumadocs-openapi

    create-next-docs-app -> create-fumadocs-app

  • 60db195: Remove Nav component export

    why: Replaced by the DocsLayout and Layout component, it is now an internal component

    migration: Use the Layout component for sharing the navbar across pages

    - import { Nav } from "fumadocs-ui/nav"
    + import { Layout } from "fumadocs-ui/layout"

Minor Changes

  • 60db195: Support transparent navbar

Patch Changes

  • 974e00f: Collapse API example by default

Don't miss a new fumadocs release

NewReleases is sending notifications on new releases.