The beautiful docs framework for Next.js. Alternative to Nextra
MIT License
Bot releases are hidden (Show)
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
fetch
problems on API PlaygroundPublished by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
89190ae: Rename prefix
option on Tailwind CSS Plugin to cssPrefix
why: The previous name was misleading
migrate: Rename the option.
import { createPreset } from 'fumadocs-ui/tailwind-plugin';
/** @type {import('tailwindcss').Config} */
export default {
presets: [
createPreset({
cssPrefix: 'fd',
}),
],
};
b02eebf: Move keepCodeBlockBackground
option to code block component
why: Easier to customise code block styles.
migrate:
Enable keepBackground
on <CodeBlock />
, and remove deprecated usage.
import { Pre, CodeBlock } from 'fumadocs-ui/components/codeblock';
<MDX
components={{
pre: ({ ref: _ref, ...props }) => (
<CodeBlock keepBackground {...props}>
<Pre>{props.children}</Pre>
</CodeBlock>
),
}}
/>;
f868018: Replace secondary
link items with icon
link items
why: Link items with type secondary
has been deprecated long time ago.
migrate: Replace type secondary
with icon
.
8aebeab: Change usage of I18nProvider
why: Make possible to load translations lazily
migrate:
import { RootProvider } from 'fumadocs-ui/provider';
import type { ReactNode } from 'react';
import { I18nProvider } from 'fumadocs-ui/i18n';
export default function Layout({
params: { lang },
children,
}: {
params: { lang: string };
children: ReactNode;
}) {
return (
<html lang={lang}>
<body>
<I18nProvider
locale={lang}
// options
locales={[
{
name: 'English',
locale: 'en',
},
{
name: 'Chinese',
locale: 'cn',
},
]}
// translations
translations={
{
cn: {
toc: '目錄',
search: '搜尋文檔',
lastUpdate: '最後更新於',
searchNoResult: '沒有結果',
previousPage: '上一頁',
nextPage: '下一頁',
},
}[lang]
}
>
<RootProvider>{children}</RootProvider>
</I18nProvider>
</body>
</html>
);
}
8aebeab: Require locale
prop on I18nProvider
why: Fix problems related to pathname parsing
migrate: Pass locale
parameter to the provider
0377bb4: Rename id
prop on Tabs component to groupId
why: Conflicted with HTML id
attribute.
migrate: Rename to groupId
.
e8e6a17: Make Tailwind CSS Plugin ESM-only
why: Tailwind CSS supported ESM and TypeScript configs.
migrate: Use ESM syntax in your Tailwind CSS config.
c901e6b: Remove deprecated fumadocs-ui/components/api
components
why: The new OpenAPI integration has its own UI implementation.
migrate: Update to latest OpenAPI integration.
89190ae: Add fd-
prefix to all Fumadocs UI colors, animations and utilities
why: The added Tailwind CSS colors may conflict with the existing colors of codebases.
migrate: Enable addGlobalColors
on Tailwind CSS Plugin or add the fd-
prefix to class names.
import { createPreset } from 'fumadocs-ui/tailwind-plugin';
/** @type {import('tailwindcss').Config} */
export default {
presets: [
createPreset({
addGlobalColors: true,
}),
],
};
b02eebf: Change code block component usage
why: The previous usage was confusing, some props are passed directly to pre
while some are not.
migrate:
Pass all props to CodeBlock
component.
This also includes class names, change your custom styles if necessary.
import { Pre, CodeBlock } from 'fumadocs-ui/components/codeblock';
<MDX
components={{
// HTML `ref` attribute conflicts with `forwardRef`
pre: ({ ref: _ref, ...props }) => (
<CodeBlock {...props}>
<Pre>{props.children}</Pre>
</CodeBlock>
),
}}
/>;
You can ignore this if you didn't customise the default pre
element.
4373231: Remove RollButton
component
why: RollButton
was created because there were no "Table Of Contents" on mobile viewports. Now users can use the TOC Popover to switch between headings, RollButton
is no longer a suitable design for Fumadocs UI.
migrate: Remove usages, you may copy the last implementation of RollButton
.
Callout
as default MDX componentPublished by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
09c3103: Change usage of TOC component
why: Improve the flexibility of headless components
migrate:
Instead of
import * as Base from 'fumadocs-core/toc';
return (
<Base.TOCProvider>
<Base.TOCItem />
</Base.TOCProvider>
);
Use
import * as Base from 'fumadocs-core/toc';
return (
<Base.AnchorProvider>
<Base.ScrollProvider>
<Base.TOCItem />
<Base.TOCItem />
</Base.ScrollProvider>
</Base.AnchorProvider>
);
b02eebf: Remove deprecated option defaultLang
why: The default language feature has been supported by Shiki Rehype integration, you should use it directly.
migrate: Rename to defaultLanguage
.
Published by fuma-nama 3 months ago
undefined
state of defaultOpen
in folder nodes
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago
Published by fuma-nama 3 months ago