Compare Versions - fumadocs-core
npm / fumadocs-core / Compare Versions
Patch Changes
- 42f0255: Support
invalidate&revalidateon dynamic loader - a807798: Improve source API utils & types
Patch Changes
- e77b9b3: Introduce
pagesIndexproperty to explicitly define the index page for folder - 334c8fd: [i18n] support different orders of
preset()calls
Patch Changes
- 768b676: Standardize
structuredDatain page data
Patch Changes
- 1dc86c7: loosen the range for waku
Patch Changes
- 062beab: fix internal types
- 505cfe0: Add
remark-block-idplugin
Patch Changes
- 79d3209: Narrow schema type for private OpenAPI properties
Patch Changes
- 61b15e9: fix Shiki languages not loaded under lazy mode
- 1a5433c: Support
$in locale for page tree generation
Patch Changes
- 9cf33e9: Improve inline code output
- 9cf33e9: Support async hooks in Shiki transformers
Patch Changes
- e1567e2: use local fork of Shiki rehype integration
- 9a200c8: fix multi-line in remark-npm
- c731a92: Implement selective re-render for TOC
- a4189ce: Improve AST plugins
Patch Changes
- 2d8f596: fix
npm packskipping nestednode_modules
Patch Changes
- 690ddb9: bundle more deps
Patch Changes
- 5524927: extend page tree root scope
- d47c4f1: LLMs: support generating section for a specific page tree node
Patch Changes
- f580ef6: Fix deserialized page tree item name styles
Patch Changes
- 0a6507b: Improve
remarkSteps()integration & support tag usage
Patch Changes
- 55479b3: Improve TOC detection logic
Minor Changes
- f45d703: stablize Shiki factory API
Patch Changes
- 45aa454: Support
placeholder()API in llms.txt generation
Patch Changes
-
c2678c0: Improve
llms.txtgeneration viaremark-llmsplugin -
417f07a: Expose Markdown stringifier
-
bb07706: Include root items only once in Breadcrumb.
Previously, when
includeRootwas set totrue, the root item was added twice to breadcrumbs. -
f065406: Support fuma-content integration
Patch Changes
- 054da73: Implement
limitoption on search servers
Patch Changes
- 8382363: [Remark Image] set
placeholdertononeby default
Patch Changes
- ddb0f81: require explicit import for new search clients
Patch Changes
- d35f30c: deprecate
highlighton content highlighter - ae3e742: Support flexsearch server & client
- 269dfb3: Redesign search client adapter interface
Patch Changes
- 5453502: use Shiki.js v4
Patch Changes
- 1a614de: enforce MDX stringifier by default
- 6ab6692: fix edge case for Dynamic Link
Patch Changes
- 00c9a0f: Remove default rerank value from mixedbread search
Minor Changes
-
9241992: Support Markdown in search results
This deprecates the old
contentWithHighlightsfield in search results, the highlights are marked with Markdown instead (e.g.Hello <mark>World</mark>).
Patch Changes
- 64a0057: [Remark Feedback] skip MDX elements by default to avoid interfering with component logic
Patch Changes
- 1ad8a38: Support server-side Mixedbread search API, deprecate client-side adapter
- 3e8efb0: [remark-structure] hotfix filter MDX elements
Patch Changes
- be957f1: use
mdast-util-to-markdownfor accurate stringification
Minor Changes
- 9ba1250: Support Universal Shiki configuration
Patch Changes
- a75a84d: fix duplicated transformer execution for fallback trees
Patch Changes
- 099fde7: [Page Tree] Extract index page from folder
- 6fd7e63: handle circular reference in page tree
Patch Changes
- 48dd0c2: fix incorrect page tree output
Patch Changes
- ea57dbf: Introduce
remark-feedback-blockplugin
Patch Changes
- cdc97e0: Improve experience with Shiki Twoslash
Patch Changes
- f5dcb7c: fix
update()source function types - 7e08b2f: Add
orama-cloud-legacysearch integration for old Orama Cloud users
Patch Changes
- 590d36a: Support
findSiblings()page tree utility - 98d38ff: Support context-aware type-safe
slugsfunction inloader() - 446631d: Support
<auto-files />syntax inremark-mdx-filesplugin - b16a32f: Switch to tsdown for bundling
Minor Changes
- a3b7919: Update mixedbread integration API and docs
Patch Changes
- 7292424: Support MDX preset in Fumadocs Core
Patch Changes
- da87713: Fix recursive checking on unknown types
- d17499b: Fix
basePathbeing ignored
Patch Changes
- ef8eb6c: Expose Zod schema for page & meta data
- e0c4c3a: [Remark Image] Respect
titlein images - 4e2bca7: support
collapsiblein meta data
Patch Changes
- 464442b: Support client-side loader, including serialization layer
- 6c668e1: Support absolute URLs in search fetch client
Minor Changes
-
15bd183: [Loader API] Default the type of
pluginstoLoaderPluginOption[]It should no longer enforce type checks on custom properties from your content source.
For creating fully typed plugins (with custom properties), use the following pattern:
import { loader } from 'fumadocs-core/source'; import { docs } from 'fumadocs-mdx:collections/server'; import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons'; export const source = loader(docs.toFumadocsSource(), { baseUrl: '/docs', plugins: ({ typedPlugin }) => [ lucideIconsPlugin(), typedPlugin({ // the plugin config }), ], }); -
42ad84c: [Loader API] Refactor internal type parameters
Internal types like
ContentStorage,PageTreeTransformernow use a singleConfig extends SourceConfiggeneric parameter.It makes extending their parameters easier, this should not affect normal usages.
Patch Changes
- 2e01720: [Loader API] Support calling
loader().getPage(slugs)with URI encoded slugs
Patch Changes
- fe380da: feat(waku): WakuLink component to use unstable_prefetchOnEnter for prefetch
- ade44d0: feat: enhance framework providers to accept custom Link components
Patch Changes
- c3b8474: hotfix Tanstack Router
usePathnameinconsistency due touseMatchon layout.
Patch Changes
- c5c00e9: Fix
usePathname()adapter for Tanstack Start
Patch Changes
- ff68f69: [Page Tree Builder] Fix node IDs are not unique across different locales
- 00058c8: Drop framework-side
createContext
Patch Changes
- 733b01e: Support
remarkDirectiveAdmonition, deprecateremarkAdmonitionin favor of it.
Patch Changes
- bc97236: Fix
rehypeCode()tsdoc forlazyoption - ca09b6a: Core: Support accessing MDX plugins separately at
fumadocs-core/mdx-plugins/* - 117ad86: Add support for using a custom GitHub API base URL
Patch Changes
- f97cd1e: Support
exportAsinremarkStructure. - f7e15e2: Support
timeoutin remark image options
Patch Changes
- 8221785: hotfix i18n middleware URL formating
Patch Changes
- 99971c7: Support
external:to mark links as external inmeta.json
Patch Changes
- d511232: Fix i18n middleware search params handling
Patch Changes
- 45f0c1f: hotfix
<DynamicCodeBlock />Vite + React 19.2 compat issues
Major Changes
-
851897c: Remove
fumadocs-core/sidebarAPIwhy: no longer used by Fumadocs UI, and the abstraction isn't good enough.
migrate: The original component is mostly a wrapper of
react-remove-scroll, you can use Shadcn UI for pre-built sidebars. -
4049ccc: Remove
fumadocs-core/serverexportgetGithubLastEdit: Moved tofumadocs-core/content/github.getTableOfContents: Moved tofumadocs-core/content/toc.PageTreeand page tree utilities: Moved tofumadocs-core/page-tree.TOCItemType,TableOfContents: Moved tofumadocs-core/toc.createMetadataImage: Use the Next.js Metadata API instead.
-
429c41a: Switch to Shiki JavaScript Regex engine by default
This is important for Cloudflare Worker compatibility, JavaScript engine is the new default over Oniguruma (WASM).
rehype-code: replaced theexperimentalJSEngineoption withengine: js | oniguruma.fumadocs-core/highlight: use JS engine by default, drop custom engine support, use Shiki directly instead.
-
5210f18: Set minimal React.js version to 19.2.0
19.2 has multiple crucial updates that can improve Fumadocs' performance, and it should works seamlessly on mainstream React.js frameworks.
As a consequence, Next.js 16 is now the minimal version when using Fumadocs UI because Next.js always uses the internal canary version of React.js.
-
42f09c3: Remove deprecated APIs
fumadocs-ui/page:- removed
<DocsCategory />. - removed
breadcrumbs.fulloption from<DocsPage />.
- removed
fumadocs-core/search/algolia: renamed optiondocumenttoindexName.fumadocs-core/search:- remove deprecated signature of
createFromSource(): migrate to newer usage instead.export function createFromSource<S extends LoaderOutput<LoaderConfig>>( source: S, pageToIndexFn?: (page: InferPageType<S>) => Awaitable<AdvancedIndex>, options?: Omit<Options<S>, 'buildIndex'>, ): SearchAPI; - remove deprecated parameters in
useSearch(), pass them in the client object instead.
- remove deprecated signature of
fumadocs-core/highlight: remove deprecatedwithPrerenderScriptandloadingoptions fromuseShiki().fumadocs-core/i18n: removedcreateI18nMiddleware, import fromfumadocs-core/i18n/middlewareinstead.fumadocs-core/source:- removed deprecated
transformers,pageTree.attach*options fromloader(). - removed deprecated
page.fileproperty. - removed
FileInfo&parseFilePathutilities.
- removed deprecated
-
55afd8a: Migrate to New Orama Cloud
@orama/coreis the new version of Orama Cloud client. See their docs for details.When using Fumadocs' Orama Cloud integration, you need to use the new client instead:
import { sync } from 'fumadocs-core/search/orama-cloud'; import { OramaCloud } from '@orama/core'; // update this const orama = new OramaCloud({ projectId: '<project id>', apiKey: '<private api key>', }); await sync(orama, { index: '<data source id>', documents: records, });
Minor Changes
- cbc93e9: Disable
singleby default onfumadocs-core/tocAPI
Patch Changes
- 230c6bf: let
getPageTreePeershandle i18n
Patch Changes
- ce2be59: Loader Plugin: support
name&configoptions - 31b9494: Support
multiple()for multiple sources in sameloader()
Patch Changes
- a3a14e7: Bump deps
Patch Changes
-
ad9a004: Deprecate
fumadocs-core/serverexportIt will be removed on Fumadocs 16, as some APIs under the
/serverexport are actually available (and even used) under browser environment.A more modularized design will be introduced over the original naming.
getGithubLastEdit: Moved tofumadocs-core/content/github.getTableOfContents: Moved tofumadocs-core/content/toc.PageTreeand page tree utilities: Moved tofumadocs-core/page-tree.TOCItemType,TableOfContents: Moved tofumadocs-core/toc.createMetadataImage: Deprecated, use the Next.js Metadata API instead.
-
90cf1fe: Support Negotiation API
-
747bdbc: Support lucide react icons plugin for
loader()
Patch Changes
- 71bce86: Make
loader().getPages()to return pages from all languages when locale is not specified - f04547f: Publish
pluginsAPI onloader()
Minor Changes
-
d1ae3e8: Move
SortedResultand other search-related types tofumadocs-core/searchThis also exposed the search result highlighter API, you may now use it for highlighting results of your own search integration
Old export will be kept until the next major release.
-
51268ec: Breadcrumbs API: default
includePagetofalse.
Patch Changes
- 655bb46: [Internal]
parseCodeBlockAttributesinclude null values, restrictrehype-codeto only parsetitleandtabattributes. - 6548a59: Support breadcrumbs for Search API
- 51268ec: Breadcrumbs API: Fix root folders being filtered when
includeRootis set totrue.
Patch Changes
- 982aed6: Fix
source.getPageByHref()return no result without explicitlanguage
Patch Changes
- 846b28a: Support multiple codeblocks in same tab
- 2b30315: Support
modeoption in search server
Patch Changes
- c948f59: Try to workaround legacy i18n middleware under
/i18nexport without breaking changes
Patch Changes
- d135efd:
transformerIconsupports SVG string to extend codeblock icons - 4082acc: Expose
highlightHastAPI
Patch Changes
- f65778d:
Linkimprove external link detection by enabling it on any protocols - e4c12a3: Add framework adapters to optional peer deps
Patch Changes
- 0b53056: Support
remarkMdxMermaid- convertmermaidcodeblocks into<Mermaid />component - 3490285: Support
remarkMdxFiles- convertfilescodeblocks into<Files />component
Patch Changes
- cedc494: Hotfix URL normalization logic
Patch Changes
- 6d97379: unify remark nodes parsing & improve types
- e776ee5: Fix
langAliasnot being passed to Shiki rehype plugin
Patch Changes
- 88b5a4e: Fix duplicate pages in page tree when referencing subpage in meta.json and using
...or adding the subfolder again - 039b24b: Fix failed to update page tree from
loader() - 08eee2b: [
remark-npm] Enablenpm installprefix fallback only on old alias
Patch Changes
- 195b090: Support a list of
sourceforloader()API - e1c84a2: Support
fallbackLanguageforloader()i18n API
Minor Changes
-
514052e: Include locale code into
page.pathPreviously when i18n is enabled,
page.pathis not equal to the virtual file paths you passed intoloader():const source = loader({ source: { files: [ { path: 'folder/index.cn.mdx', // ... }, ], }, }); console.log(source.getPages('cn')); // path: folder/index.mdxThis can be confusing, the only solution to obtain the original path was
page.absolutePath.From now, the
page.pathwill also include the locale code:const source = loader({ source: { files: [ { path: 'folder/index.cn.mdx', // ... }, ], }, }); console.log(source.getPages('cn')); // path: folder/index.cn.mdxWhile this change doesn't affect intended API usages, it may lead to minor bugs when advanced usage/hacks involved around
page.path. -
e785f98: Introduce page tree
fallbackAPIPage tree is a tree structure.
Previously, when an item is excluded from page tree, it is isolated entirely that you cannot display it at all.
With the new fallback API, isolated pages will go into
fallbackpage tree instead:{ "children": [ { "type": "page", "name": "Introduction" } ], "fallback": { "children": [ { "type": "page", "name": "Hidden Page" } ] } }Items in
fallbackare invisible unless you've opened its item. -
0531bf4: Introduce page tree transformer API
You can now define page tree transformer.
export const source = loader({ // ... pageTree: { transformers: [ { root(root) { return root; }, file(node, file) { return node; }, folder(node, dir, metaPath) { return node; }, separator(node) { return node; }, }, ], }, }); -
50eb07f: Support type-safe i18n config
// lib/source.ts import { defineI18n } from 'fumadocs-core/i18n'; export const i18n = defineI18n({ defaultLanguage: 'en', languages: ['en', 'cn'], });// root layout import { defineI18nUI } from 'fumadocs-ui/i18n'; import { i18n } from '@/lib/i18n'; const { provider } = defineI18nUI(i18n, { translations: { cn: { displayName: 'Chinese', search: 'Translated Content', }, en: { displayName: 'English', }, }, }); function RootLayout({ children }: { children: React.ReactNode }) { return <RootProvider i18n={provider(lang)}>{children}</RootProvider>; }Although optional, we highly recommend you to refactor the import to i18n middleware:
// here! import { createI18nMiddleware } from 'fumadocs-core/i18n/middleware'; import { i18n } from '@/lib/i18n'; export default createI18nMiddleware(i18n);
Patch Changes
- e254c65: Simplify Source API storage management
- ec75601: Support
ReactNodefor icons in page tree - 67df155:
createFromSourcesupport asyncbuildIndexand Fumadocs MDX Async Mode - b109d06: Redesign
useShiki&<DynamicCodeBlock />to use React 19 hooks
Patch Changes
-
569bc26: Improve
remark-image: (1) append public URL to outputsrcif it is a URL. (2) ignore if failed to obtain SVG size. -
817c237: Support search result highlighting.
Result nodes now have a
contentWithHighlightsproperty, you can render it with custom renderer, or a default one provided on Fumadocs UI.
Patch Changes
- 0ab2cdd: remove waku & tanstack peer dependency temporarily (see https://github.com/fuma-nama/fumadocs/issues/2144)
Patch Changes
- 6fa1442: Support to override
<HideIfEmpty />scripts nonce with<HideIfEmptyProvider />
Patch Changes
- 1b0e9d5: Add mixedbread integration
Patch Changes
- 658fa96: Support custom options for error handling for
remark-image
Patch Changes
- 1a902ff: Fix static export map
Minor Changes
-
f8d1709: Redesigned Codeblock Tabs
Instead of relying on
Tabscomponent, it supports a dedicated tabs component for codeblocks:<CodeBlockTabs> <CodeBlockTabsList> <CodeBlockTabsTrigger value="value">Name</CodeBlockTabsTrigger> </CodeBlockTabsList> <CodeBlockTab value="value" asChild> <CodeBlock>...</CodeBlock> </CodeBlockTab> </CodeBlockTabs>The old usage is not deprecated, you can still use them while Fumadocs' remark plugins will generate codeblock tabs using the new way.
Patch Changes
- d0f8a15: Enable
remarkNpmby default, replaceremarkInstallwith it. - 84918b8: Support passing
tagto search client/server as string array
Patch Changes
- 0d3f76b: Fix wrong indexing of file system
Patch Changes
- 35c3c0b: Support handling duplicated slugs and conflicts such as
dir/index.mdxvsdir.mdx
Patch Changes
- 7d1ac21: hotfix paths not being normalized on Windows
Patch Changes
- 7a45921: Add
absolutePathandpathproperties to pages, markfileas deprecated - 1b7bc4b: Add
@types/reactto optional peer dependency to avoid version conflict in monorepos
Patch Changes
-
b4916d2: Move
hide-if-emptycomponent to Fumadocs Core -
8738b9c: Always encode generated slugs for non-ASCII characters in
loader() -
a66886b: Deprecate other parameters for
useDocsSearch()The new usage passes options to a single object, improving the readability:
import { useDocsSearch } from 'fumadocs-core/search/client'; const { search, setSearch, query } = useDocsSearch({ type: 'fetch', locale: 'optional', tag: 'optional', delayMs: 100, allowEmpty: false, });
Patch Changes
- 0ab6c7f: Improve performance by using shallow compare on
useOnChangeby default
Minor Changes
-
961b67e: Bump algolia search to v5
This also introduced changes to some APIs since
algoliasearchv4 and v5 has many differences.Now we highly recommend to pass an index name to
sync():import { algoliasearch } from 'algoliasearch'; import { sync } from 'fumadocs-core/search/algolia'; const client = algoliasearch('id', 'key'); void sync(client, { indexName: 'document', documents: records, });For search client, pass them to
searchOptions:'use client'; import { liteClient } from 'algoliasearch/lite'; import type { SharedProps } from 'fumadocs-ui/components/dialog/search'; import SearchDialog from 'fumadocs-ui/components/dialog/search-algolia'; const client = liteClient(appId, apiKey); export default function CustomSearchDialog(props: SharedProps) { return ( <SearchDialog searchOptions={{ client, indexName: 'document', }} {...props} showAlgolia /> ); }
Patch Changes
- 1b999eb: Introduce
<Markdown />component - 7d78bc5: Improve
createRelativeLinkandgetPageByHreffor i18n usage
Patch Changes
- 4ae7b4a: Support MDX in codeblock tab value
Patch Changes
- c25d678: Support Shiki focus notation transformer by default
Patch Changes
- 3372792: Support line numbers in codeblock
Patch Changes
- c05dc03: Improve error message of remark image
Patch Changes
- 50db874: Remove placeholder space for codeblocks
- 79e75c3: Improve default MDX attribute indexing strategy for
remarkStructure
Patch Changes
- 6ea1718: Fix type inference for
pageTree.attachFileinloader()
Patch Changes
-
acff667: Deprecate
createFromSource(source, pageToIndex, options)Migrate:
import { source } from '@/lib/source'; import { createFromSource } from 'fumadocs-core/search/server'; // from export const { GET } = createFromSource( source, (page) => ({ title: page.data.title, description: page.data.description, url: page.url, id: page.url, structuredData: page.data.structuredData, // use your desired value, like page.slugs[0] tag: '<value>', }), { // options }, ); // to export const { GET } = createFromSource(source, { buildIndex(page) { return { title: page.data.title, description: page.data.description, url: page.url, id: page.url, structuredData: page.data.structuredData, // use your desired value, like page.slugs[0] tag: '<value>', }; }, // other options });
Patch Changes
- 07cd690: Support separators without name
Patch Changes
- ec85a6c: support more options on
remarkStructure - e1a61bf: Support
remarkStepsplugin
Patch Changes
- d49f9ae: Fix order of
<I18nProvider /> - b07e98c: fix
loader().getNodePage()returning undefined for other locales - 3a4bd88: Fix wrong index files output in i18n page tree generation
Patch Changes
- c66ed79: Fix
removeScrollOnon sidebar primitive
Patch Changes
- 1057957: Fix type problems on dynamic codeblock
Patch Changes
- 0829544: deprecate
blockScrollingWidthin favour ofremoveScrollOn
Minor Changes
- 2fd325c: Enable
lazyonrehypeCodeby default - a7cf4fa: Support other frameworks via
FrameworkProvider
Patch Changes
- b734f92: support
mdxJsxFlowElementinremarkStructure
Patch Changes
- 3f580c4: Support directory-based i18n routing
Patch Changes
- c5add28: use internal store for Shiki highlighter instances
- f3cde4f: Support markdown files with default local code in file name
- 7c8a690: Improve file info interface
- b812457: Remove Next.js usage from search server
Minor Changes
- f491f6f: Lazy build page tree by default
- f491f6f: Support
getPageByHref()on loader API
Patch Changes
- f491f6f: Fix
findNeighbour()doesn't exclude other nodes of another root
Patch Changes
- 72f79cf: Support Orama Cloud crawler index
Patch Changes
- 9f6d39a: Fix peer deps
- 2035cb1: remove hook-level cache from
useDocsSearch()
Patch Changes
- 37dc0a6: Update
image-sizeto v2 - 796cc5e: Upgrade to Orama v3
- 2cc0be5: Support to add custom serialization to
remarkStructureviadata._string
Patch Changes
- 3534a10: Move
fumadocs-corehighlighting utils tofumadocs-core/highlightandfumadocs-core/highlight/client - 93952db: Generate a
$idattribute to page tree nodes
Patch Changes
- d95c21f: add
initOramaoption to static client
Patch Changes
- 5deaf40: Support icons in separators of
meta.json
Patch Changes
- 08236e1: Support custom toc settings in headings
- a06af26: Support pages without
title
Minor Changes
-
581f4a5: Support code block tabs without hardcoding
<Tabs />itemsmigrate: Use the
remarkCodeTabplugin.before:
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; <Tabs items={["Tab 1", "Tab 2"]}> ```ts tab console.log('A'); ``` ```ts tab console.log('B'); ``` </Tabs>after:
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; ```ts tab="Tab 1" console.log('A'); ``` ```ts tab="Tab 2" console.log('B'); ```
Patch Changes
- 5b8cca8: Fix
remarkAdmonitionmissing some types from Docusaurus - a763058: Support reversed rest items in
meta.json
Patch Changes
- b9601fb: Update Shiki
Patch Changes
- 777188b: [Page Tree Builder] Inline folders without children
Patch Changes
- bb73a72: Fix search params being ignored in middleware redirection
- 69bd4fe: Support
source.getPageTree()function
Patch Changes
- 041f230: Support trailing slash
Patch Changes
- 14b280c: Revert default i18n config
Patch Changes
- 72dc093: Add chinese i18n configuration for Orama search if not specified
Minor Changes
- 97ed36c: Remove defaults from
loaderand deprecaterootDiroptions
Patch Changes
- 5474343: Export dynamic-link
Patch Changes
- 969da26: Improve i18n api
Patch Changes
- b71064a: Support remark plugins & vfile input on
getTableOfContents
Patch Changes
- 2357d40: Fix typings of
HighlightOptions
Minor Changes
- bebb16b: Add support for pre-rendering to
useShikihook - 050b326: Support codeblock
tabmeta without value
Patch Changes
- 4dfde6b: support additional
componentsoption of Orama search - 4766292: Support React 19
Patch Changes
- 9a18c14: Downgrade Orama to v2 to fix external tokenizers
Patch Changes
- ca94bfd: Support sync usage of
getTableOfContents
Minor Changes
- e248a0f: Support Orama Cloud integration
Patch Changes
- 1573d63: Support URL format
publicDirin Remark Image plugin
Major Changes
-
e45bc67: Remove deprecated
fumadocs-core/middlewareexportmigrate: Use
fumadocs-core/i18n. -
d9e908e: Remove deprecated
languagesanddefaultLanguageoption from loadermigrate: Use I18n config API
-
9a0b09f: Change usage of
useDocsSearchwhy: Allow static search
migrate:
Pass client option, it can be algolia, static, or fetch (default).
import { useDocsSearch } from 'fumadocs-core/search/client'; const { search, setSearch, query } = useDocsSearch({ type: 'fetch', api: '/api/search', // optional }); -
9a0b09f: Remove Algolia Search Client
why: Replace by the new search client
migrate:
import { useDocsSearch } from 'fumadocs-core/search/client'; const { search, setSearch, query } = useDocsSearch({ type: 'algolia', index, ...searchOptions, }); -
9a0b09f: Refactor import path of
fumadocs-core/search-algolia/servertofumadocs-core/search/algolia -
d9e908e: Improved usage for
createI18nSearchAPI(replacedcreateI18nSearchAPIExperimental) -
d9e908e: Replace
fumadocs-core/search/sharedwithfumadocs-core/server
Minor Changes
- d9e908e: Create search api from source (Support i18n without modifying search route handler)
- 367f4c3: Support referencing original page/meta from page tree nodes
- e1ee822: Support hast nodes in
tocvariable - 979e301: Replace flexearch with Orama
- 979e301: Support static search (without server)
- d9e908e: Support creating metadata API from sources
Patch Changes
- f949520: Support Shiki diff transformer
- e612f2a: Make compatible with Next.js 15
- 8ef00dc: Apply
hideLocaleto SourcegetPageAPIs - 15781f0: Fix breadcrumb empty when
includePageisn't specified - be820c4: Bump deps
Patch Changes
- 6231ad3: fix(types): PageData & MetaData exactOptionalPropertyTypes compat
Patch Changes
- 083f04a: Fix link items text
Patch Changes
- 78e59e7: Support to add icons to link items in meta.json
Patch Changes
- 6e1923e: Improve anchors observer
Patch Changes
- afb697e: Fix Next.js 14.2.8 dynamic import problems
- daa66d2: Support generating static params automatically with Source API
Patch Changes
- 729928e: Fix build error without JS engine
Patch Changes
- 7dabbc1: Remark Image: Support relative imports
- 0c251e5: Bump deps
- 3b56170: Support to enable experiment Shiki JS engine
Patch Changes
- 95dbba1: Scan table into search indexes by default
Patch Changes
- f8cc167: Ignore numeric locale file name
Patch Changes
- 0e0ef8c: Support headless search servers
Minor Changes
- fd46eb6: Export new
createI18nSearchAPIExperimentalAPI for i18n config - fd46eb6: Introduce
i18nconfig for Core APIs - fd46eb6: Deprecated
languagesanddefaultLanguageoption on Source API, replaced withi18nconfig - fd46eb6: Move I18n middleware to
fumadocs-core/i18n - 9aae448: Support multiple toc active items
- c542561: Use cookie to store active locale on
alwaysmode
Patch Changes
- 4916f84: Improve Source API performance
Patch Changes
- 36b771b: Remark Image: Support relative import path
- 61b91fa: Improve Fumadocs OpenAPI support
Patch Changes
- 17fa173: Remark Image: Support fetching image size of external urls
Patch Changes
- 96c9dda: Change Heading scroll margins
Patch Changes
- f280191: Page Tree Builder: Sort folders to bottom
Patch Changes
- 37bbfff: Improve active anchor observer
Patch Changes
- 2cf65f6: Support debounce value on algolia search client
Patch Changes
- 5355391: Support indexing description field on documents
Patch Changes
- 978342f: Type file system utilities (Note: This is an internal module, you're not supposed to reference it)
Patch Changes
- 4819820: Page Tree Builder: Fallback to page icon when metadata doesn't exist
Major Changes
-
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
defaultLangwhy: The default language feature has been supported by Shiki Rehype integration, you should use it directly.
migrate: Rename to
defaultLanguage.
Minor Changes
- c714eaa: Support Remark Admonition plugin
Patch Changes
- fccdfdb: Improve TOC Popover design
- 2ffd5ea: Support folder group on Page Tree Builder
Patch Changes
- a5c34f0: Support specifying the url of root node when breadcrumbs have
includeRootenabled
Minor Changes
- b9fa99d: Support
tagfacet field for Algolia Search Integration
Patch Changes
- 525925b: Support including root folder into breadcrumbs
Patch Changes
- 503e8e9: Support
keywordsAPI in advanced search
Patch Changes
- 90d51cb: Fix problem with I18n middleware & language toggle
Patch Changes
- ca7d0f4: Support resolving async search indexes
Patch Changes
- cf852f6: Add configurable delayMs Parameter for Debounced Search Performance
Minor Changes
- ce3c8ad: Page Tree Builder: Support
defaultLanguageoption - ce3c8ad: Support hiding locale prefixes with I18n middleware
Minor Changes
- b70ff06: Support
!nameto hide pages onmeta.json
Patch Changes
- b4856d1: Fix
createGetUrlwrong locale position
Patch Changes
- a39dbcb: Export
loadFilesfrom Source API
Minor Changes
-
0a377a9: Support writing code blocks as a
<Tab />element.import { Tabs } from 'fumadocs-ui/components/tabs'; <Tabs items={["Tab 1", "Tab 2"]}> ```js tab="Tab 1" console.log('Hello'); ``` ```js tab="Tab 2" console.log('Hello'); ``` </Tabs>This is same as wrapping the code block in a
<Tab />component. -
0a377a9: Pass the
iconprop to code blocks as HTML instead of MDX attribute.why: Only MDX flow elements support attributes with JSX value, like:
<Pre icon={<svg />}>...</Pre>As Shiki outputs hast elements, we have to convert the output of Shiki to a MDX flow element so that we can pass the
iconproperty.Now,
rehype-codepasses a HTML string instead of JSX, and render it withdangerouslySetInnerHTML:<Pre icon="<svg />">...</Pre>migrate: Not needed, it should work seamlessly.
Patch Changes
- 7a29b79: Remove default language from
source.getLanguages - b0c1242: Support Next.js 15 cache behaviour in
getGithubLastEdit
Patch Changes
- 72dbaf1: Support
ReactNodein page tree, table of contents and breadcrumb type definitions - 51ca944: Support including separators in breadcrumbs
Patch Changes
- 053609d: Rename
defaultLangtodefaultLanguage
Major Changes
-
98430e9: Remove
minWidthdeprecated option fromSidebarcomponent.migrate: Use
blockScrollingWidthinstead
Minor Changes
- 57eb762: Support attaching custom properties during page tree builder process
Patch Changes
- d88dfa6: Support attaching
idproperty to page trees - ba20694: Remark Headings: Support code syntax in headings
Patch Changes
- 1b8e12b: Use
display: gridfor codeblocks
Minor Changes
- 917d87f: Rename sidebar primitive
minWidthprop toblockScrollingWidth
Patch Changes
- 88008b1: Fix ESM compatibility problems in i18n middleware
- 944541a: Add dynamic page url according to locale
- 07a9312: Improve Search I18n utilities
Patch Changes
- 8ef2b68: Bump deps
- 26f464d: Support relative paths in meta.json
- 26f464d: Support non-external link in meta.json
Patch Changes
- 98258b5: Fix regex problems
Patch Changes
- f7c2c5c: Fix custom heading ids conflicts with MDX syntax
Patch Changes
- 5653d5d: Support customising heading id in headings
- 5653d5d: Support custom heading slugger
Patch Changes
- 7b61b2f: Migrate
fumadocs-uito fully ESM, adding support for ESMtailwind.configfile
Major Changes
-
2d8df75: Remove
cwdoption fromremark-dynamic-contentwhy: Use
cwdfrom vfilemigrate: Pass the
cwdoption from remark instead -
92cb12f: Simplify Source API virtual storage.
why: Improve performance
migrate:
- storage.write('path.mdx', { type: 'page', ... }) - storage.readPage('page') + storage.write('path.mdx', 'page', { ... }) + storage.read('page', 'page')Transformers can now access file loader options.
load({ transformers: [ ({ storage, options }) => { options.getUrl(); options.getSlugs(); }, ], }); -
f75287d: Introduce
fumadocs-docgenpackage.Offer a better authoring experience for advanced use cases.
- Move
remark-dynamic-contentandremark-installplugins to the new packagefumadocs-docgen. - Support Typescript generator by default
Usage
Add the
remarkDocGenplugin to your remark plugins.import { remarkDocGen, fileGenerator } from "fumadocs-docgen"; remark().use(remarkDocGen, { generators: [fileGenerator()] });Generate docs with code blocks.
```json doc-gen:<generator> { // options } ```Migrate
For
remarkDynamicContent, enablefileGeneratorand use this syntax:```json doc-gen:file { "file": "./path/to/my-file.txt" } ```For
remarkInstall, it remains the same:import { remarkInstall } from "fumadocs-docgen"; - Move
-
2d8df75: Remove support for
getTableOfContentsFromPortableTextwhy: Sanity integration should be provided by 3rd party integrations
migrate: Use built-in sources, or write a custom implementation
Patch Changes
- bbad52f: Support
buninremark-installplugin
Patch Changes
- 779c599: Mark
getTableOfContentsFromPortableTextdeprecated - 0c01300: Fix remark-dynamic-content ignored code blocks
- 779c599: Support relative resolve path for remark-dynamic-content
Patch Changes
- e47c62f: Improve remark plugin typings
Patch Changes
- 6f321e5: Fix type errors of flexseach
Patch Changes
- 10e099a: Remove deprecated options from
fumadocs-core/toc
Patch Changes
- c9b7763: Update to Next.js 14.1.0
- 0e78dc8: Support customising search API URL
- d8483a8: Remove undefined values from page tree
Major Changes
-
321d1e1f: Move Typescript integrations to
fumadocs-typescriptwhy: It is now a stable feature
migrate: Use
fumadocs-typescriptinstead.- import { AutoTypeTable } from "fumadocs-ui/components/auto-type-table" + import { AutoTypeTable } from "fumadocs-typescript/ui"
Minor Changes
- b5d16938: Support external link in
pagesproperty
Minor Changes
- 909b0e35: Support duplicated names with meta and page files
- 1c388ca5: Support
defaultOpenfor folder nodes
Patch Changes
- 691f12aa: Source API: Support relative paths as root directory
Minor Changes
- 5c24659: Support code block icons
Minor Changes
- eb028b4: Migrate to shiki
- 054ec60: Support generating docs for Typescript file
Patch Changes
- 6c5a39a: Rename Git repository to
fumadocs
Major Changes
-
2ea9437: Migrate to rehype-shikiji
- Dropped support for inline code syntax highlighting
- Use notation-based word/line highlighting instead of meta string
Before:
```ts /config/ {1} const config = 'Hello'; something.call(config); ```After:
```ts // [!code word:config] const config = 'Hello'; // [!code highlight] something.call(config); ```Read the docs of Shikiji for more information.
-
cdff313: Separate Contentlayer integration into another package
why: As Fumadocs MDX is the preferred default source, Contentlayer should be optional.
migrate:
Install
fumadocs-contentlayer.- import { createContentlayerSource } from "fumadocs-core/contentlayer" + import { createContentlayerSource } from "fumadocs-contentlayer" - import { createConfig } from "fumadocs-core/contentlayer/configuration" + import { createConfig } from "fumadocs-contentlayer/configuration" -
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
Minor Changes
- 1a346a1: Add
remark-imageplugin that converts relative image urls into static image imports (Inspired by Nextra)