compileFile() strips the frontmatter from the content and parses it into file.data.frontmatter, unless the file already has it. Content compiled for the client no longer renders its frontmatter.
compile() works when destructured from the compiler.
Fix OAuth handler redirects that other subdomains could control
createOAuthHandler() read the page to return to from a cookie, which other subdomains could set to send authorization codes and tokens to another site. The page is now kept in sessionStorage, and the handler sends users back from the browser.
It loads its script from the same route, Content Security Policies need to allow 'self' scripts there (without 'strict-dynamic'), or leave the route out.
Unions of const members render as a labelled select
In the playground, a oneOf/anyOf whose members are all const is one select labelled by each member's title, instead of a switch between members.
renderParameterField can render the default input with another schema
renderParameterField gets ctx.renderDefault(schema) as its third argument, which renders the parameter's default input with schema replacing its own. For example, an enum of values loaded at runtime shows the playground's select.
Index card links with contentDir
index.url.contentDir of generateFiles() resolves the generated pages from the output directory, card links no longer start with ../.
Card links use forward slashes on Windows.
Names for the selects of operation pages
The selects that switch the code language, the example request, the response status, the media type, the security scheme and the variant of a union schema now have an accessible name, so a screen reader announces what they choose and not only their value. The names go through t() like the other labels. ExampleSelect accepts an aria-label.
The proxy keeps fetch() working
Without allowedOrigins, the proxy imports undici, which replaced the dispatcher of the built-in fetch(). Afterwards, fetch() rejected requests setting content-length, and ignored configured dispatchers like NODE_USE_ENV_PROXY. The dispatcher is now restored.
The proxy no longer forwards content-length, fetch() sets it from the body.
@fumadocs/base-ui@16.17.9
fumadocs-core@16.17.9
fumadocs-ui@16.17.9
Keep the theme on Astro navigations
The Astro RootProvider keeps the theme across navigations of the Astro client router.
Faster and more stable TOC
TOCItems of the normal and clerk styles no longer throws "is not iterable" when navigating between pages quickly.
The TOC track is measured once per change and drawn before paint: less work on navigation, no frame showing the previous page's track.
The normal style highlights the active range right after the page loads, not only after the first scroll.
Custom heading IDs containing quotes no longer crash the normal and clerk styles.
New @fumadocs/astro integration, running the Markdown features of Fumadocs on the Sätteri processor of Astro. It adds the React and MDX integrations unless they are configured.
MDX content renders as one React island with the components of its collection, Fumadocs UI components work in full. Without them, it renders as Astro MDX.
The wrapper component receives the props of <Content />, for providers like i18n.
Islands with transition:persist keep their state on navigation, the content of the new page moves into them.
The collections option defines the content directories of Fumadocs, each can override the options of the integration. pageLoader() and metaLoader() load them by name into Astro content collections with the schemas of Fumadocs, and toFumadocsSource() creates the source of Fumadocs. Its pages load their content with page.data.load(), like other content sources.
The Astro template uses @fumadocs/astro.
Hide server-only search on static templates
The search prompt hides Mixedbread on static, SPA and Astro templates.
Search sync on Vercel
The Next.js sync script of feature search finds static.json when Next.js builds with an adapter, like on Vercel.
Astro support
init, feature docs, og, llms, search, webmcp and feedback support Astro projects, including init --i18n.
mcp and epub support Astro projects with output: 'server', export epub --framework astro fetches from the running server.
og, llms and search follow the i18n routes of Astro projects.
ai refuses Astro projects.
Fixes
init --i18n names the languages of the language switch, and translates the UI of cn with @fumadocs/language.
Properties added to an empty config object, like defineConfig({}), go on their own lines.
With hideLocale: 'default-locale', baseOptions() links the home of the default language to /.
Unions of const members render as a labelled select
In the playground, a oneOf/anyOf whose members are all const is one select labelled by each member's title, instead of a switch between members.
Index card links with contentDir
index.url.contentDir of generateFiles() resolves the generated pages from the output directory, card links no longer start with ../.
Card links use forward slashes on Windows.
Official Astro support
New @fumadocs/astro integration, running the Markdown features of Fumadocs on the Sätteri processor of Astro. It adds the React and MDX integrations unless they are configured.
MDX content renders as one React island with the components of its collection, Fumadocs UI components work in full. Without them, it renders as Astro MDX.
The wrapper component receives the props of <Content />, for providers like i18n.
Islands with transition:persist keep their state on navigation, the content of the new page moves into them.
The collections option defines the content directories of Fumadocs, each can override the options of the integration. pageLoader() and metaLoader() load them by name into Astro content collections with the schemas of Fumadocs, and toFumadocsSource() creates the source of Fumadocs. Its pages load their content with page.data.load(), like other content sources.
The Astro template uses @fumadocs/astro.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
TypeScript 7.1
Twoslash, type tables and story controls run on the stable API of TypeScript 7.1 (typescript@7.1.0-beta), with code loaded as in-memory files.
Twoslash no longer writes code blocks to the .twoslash directory, you can remove it from .gitignore.
Twoslash completions work in the global scope, relative paths in compiler options (like paths) resolve from cwd.
No tsconfig.fumadocs-typescript.json or tsconfig.fumadocs-story.json is generated.
Type tables are 2.4x faster on large API references, each from a program of its file and the files it imports.
The transform option of type tables gets the checker of TypeScript 7.1, typeToString() takes TypeFormatFlags.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
TypeScript 7.1
Twoslash, type tables and story controls run on the stable API of TypeScript 7.1 (typescript@7.1.0-beta), with code loaded as in-memory files.
Twoslash no longer writes code blocks to the .twoslash directory, you can remove it from .gitignore.
Twoslash completions work in the global scope, relative paths in compiler options (like paths) resolve from cwd.
No tsconfig.fumadocs-typescript.json or tsconfig.fumadocs-story.json is generated.
Type tables are 2.4x faster on large API references, each from a program of its file and the files it imports.
The transform option of type tables gets the checker of TypeScript 7.1, typeToString() takes TypeFormatFlags.
Faster story controls in dev servers
Story files requested together share one TypeScript program, and Vite environments share their results. A cold start with 300 story files takes 4s instead of 30s, without blocking the Vite dev server.
Twoslash, type tables and story controls run on the stable API of TypeScript 7.1 (typescript@7.1.0-beta), with code loaded as in-memory files.
Twoslash no longer writes code blocks to the .twoslash directory, you can remove it from .gitignore.
Twoslash completions work in the global scope, relative paths in compiler options (like paths) resolve from cwd.
No tsconfig.fumadocs-typescript.json or tsconfig.fumadocs-story.json is generated.
Type tables are 2.4x faster on large API references, each from a program of its file and the files it imports.
The transform option of type tables gets the checker of TypeScript 7.1, typeToString() takes TypeFormatFlags.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Processed Markdown links page-relative images at their served URLs
Images imported by Remark Image get the URLs bundlers serve them at in Remark LLMs, instead of their relative paths
Stringifiers output JS expressions with s.expression(), for Markdown only known at runtime
Search records of included content with images are no longer cut
The Sätteri preset only imports images in bundlers, at runtime it resolves their sizes like the MDX preset
<include> in Local Markdown
<include> is enabled by default in @fumadocs/local-md and @fumadocs/satteri/local-md, and pages reload when the files they include change, with both the Vite and dev server watchers.
invalidateFile() returns whether the source uses the file.
Both require fumadocs-core 16.17.8.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Value rows of auth providers accept end
The Value row an auth provider renders can take end, which shows after the input, like a button that fills the value. The playground already rendered it, now its type has it.
Parameter examples follow the selected request example
When a parameter has an example under the same key as a request body example, that example's request uses it, so each example can show its own path, query, header or cookie values. Without a matching key, a parameter still uses its first example.
renderParameterField can keep the default input
When renderParameterField returns undefined for a parameter, the playground renders its default input, so you can customize a few parameters without re-implementing the rest. Return null to render nothing.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Watch the dependencies of local content
Integrations call file.addDependency(path) for the files a parsed file depends on, like included files. A change to them invalidates the file, and the Vite & dev server watchers watch them, even outside the content directory.
invalidateFile() returns whether the source uses the file, onDependency() listens to the dependencies. Custom sources passed to the watchers need both.
watchWithVite() called after the Vite server started now watches content directories outside of Vite's root.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
@fumadocs/base-ui@16.17.8
fumadocs-core@16.17.8
fumadocs-ui@16.17.8
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
remarkInclude in fumadocs-core
<include> moved from Fumadocs MDX to fumadocs-core/mdx-plugins/remark-include, a unified plugin for any MDX or Markdown pipeline.
fumadocs-mdx/config still exports remarkInclude, forwarded from fumadocs-core.
getProcessor parses included files by their format, like a .md file included in an .mdx page.
Headings in an included section get IDs unique among the page's own headings.
Circular includes throw instead of hanging, and included code files no longer end with an empty line.
fumadocs-mdx requires fumadocs-core 16.17.8.
Processed Markdown links page-relative images at their served URLs
Images imported by Remark Image get the URLs bundlers serve them at in Remark LLMs, instead of their relative paths
Stringifiers output JS expressions with s.expression(), for Markdown only known at runtime
Search records of included content with images are no longer cut
The Sätteri preset only imports images in bundlers, at runtime it resolves their sizes like the MDX preset
remarkInclude in fumadocs-core
<include> moved from Fumadocs MDX to fumadocs-core/mdx-plugins/remark-include, a unified plugin for any MDX or Markdown pipeline.
fumadocs-mdx/config still exports remarkInclude, forwarded from fumadocs-core.
getProcessor parses included files by their format, like a .md file included in an .mdx page.
Headings in an included section get IDs unique among the page's own headings.
Circular includes throw instead of hanging, and included code files no longer end with an empty line.
fumadocs-mdx requires fumadocs-core 16.17.8.
<include> in Local Markdown
<include> is enabled by default in @fumadocs/local-md and @fumadocs/satteri/local-md, and pages reload when the files they include change, with both the Vite and dev server watchers.
invalidateFile() returns whether the source uses the file.
Both require fumadocs-core 16.17.8.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Watch the dependencies of local content
Integrations call file.addDependency(path) for the files a parsed file depends on, like included files. A change to them invalidates the file, and the Vite & dev server watchers watch them, even outside the content directory.
invalidateFile() returns whether the source uses the file, onDependency() listens to the dependencies. Custom sources passed to the watchers need both.
watchWithVite() called after the Vite server started now watches content directories outside of Vite's root.
Unknown languages in Local HTML
Code blocks in languages Shiki doesn't know render as plain text, instead of failing the page.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.
Watch the dependencies of local content
Integrations call file.addDependency(path) for the files a parsed file depends on, like included files. A change to them invalidates the file, and the Vite & dev server watchers watch them, even outside the content directory.
invalidateFile() returns whether the source uses the file, onDependency() listens to the dependencies. Custom sources passed to the watchers need both.
watchWithVite() called after the Vite server started now watches content directories outside of Vite's root.
Bring your own highlighter
Shiki stays the default, and isn't loaded when you highlight code with another highlighter.
fumadocs-core/highlight exports a Highlighter interface, created with createHighlights() from fumadocs-core/highlight/highlights (@pierre/highlights) or createShikiHighlighter() from fumadocs-core/highlight/shiki, override() creates one with other options.
rehypeCodeFromHighlighter from fumadocs-core/mdx-plugins/rehype-code.core highlights code blocks with a highlighter, or a function creating one with the transformers of Fumadocs. createRehypeCode is deprecated, Sätteri has rehypeCodeFromHighlighter in @fumadocs/satteri/rehype-code. Pass transformerTwoslash() in its transformers option to analyze Twoslash blocks in batches.
createServerCodeBlock() and createDynamicCodeBlock() in Fumadocs UI create code blocks from a highlighter. Dynamic code blocks are highlighted on the server too.
toJsx() from fumadocs-core/utils/hast-to-jsx converts hast into React elements like toJsxRuntime() of hast-util-to-jsx-runtime, MDX nodes through an evaluator, over 10x faster on highlighted code, whose spans render as one HTML string. Every Fumadocs renderer uses it, hast-util-to-jsx-runtime is no longer a dependency.
Twoslash loads the languages of code blocks in popups before highlighting, an unknown language there no longer fails the code block.
OpenAPI Standalone highlights code blocks with Highlights, in its server-rendered pages too.
The page factories of OpenAPI, GraphQL and AsyncAPI, type tables, createPython(), createPythonComponents(), localHtml() and the shadcn createSnippet() take a highlighter.
Deprecated shiki and shikiOptions of the API pages and shiki of type tables, pass a highlighter instead.
Integrations require fumadocs-core 16.17.8, the API pages and shadcn also require fumadocs-ui 16.17.8.