fumadocs-ui 8.0.0
Major Changes
-
a2f4819: Improve internationalized routing
I18nProvidernow handles routing for you. Therefore,localeandonChangeis no longer required.<I18nProvider translations={{ cn: { name: 'Chinese', // required search: 'Translated Content', }, }} ></I18nProvider>LanguageSelectdetects available options from your translations, therefore, thelanguagesprop is removed. -
c608ad2: Remove deprecated
docsUiPluginsmigrate: Use
createPresetinsteadconst { 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
preelement 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-corenext-docs-ui->fumadocs-uinext-docs-mdx->fumadocs-mdx@fuma-docs/openapi->fumadocs-openapicreate-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