Major Changes
-
7b450d6: Change
postInstall()signature topostInstall({ configPath, outDir, ... })This allows more options for
postInstallcommand. -
a312d3a: Replace
getDefaultMDXOptions()withapplyMdxPreset()This allows Fumadocs MDX to support more presets in the future, and adjust presets for dynamic mode.
// source.config.ts import { defineCollections, applyMdxPreset } from 'fumadocs-mdx/config'; import { myPlugin } from './remark-plugin'; export const blog = defineCollections({ type: 'doc', mdxOptions: applyMdxPreset({ remarkPlugins: [myPlugin], // You can also pass a function to control the order of remark plugins. remarkPlugins: (v) => [myPlugin, ...v], }), });
-
bc93578: Replace
lastModifiedTimeoption withlastModifiedplugin.If you've
lastModifiedTimeoption enabled before, migrate to the plugin instead.// source.config.ts import { defineConfig } from 'fumadocs-mdx/config'; import lastModified from 'fumadocs-mdx/plugins/last-modified'; export default defineConfig({ plugins: [lastModified()], });
-
2f7e4d8: Drop support for multiple
dirin same collectionConsider using
filesinstead for filtering files.// source.config.ts import { defineDocs } from 'fumadocs-mdx/config'; export const docs = defineDocs({ dir: 'content/guides', docs: { files: ['./i-love-fumadocs/**/*.{md,mdx}'], }, });
-
a312d3a: No longer generate
extractedReferencesby defaultYou can enable it from
postprocessoption.// source.config.ts import { defineDocs } from 'fumadocs-mdx/config'; export const docs = defineDocs({ docs: { postprocess: { extractLinkReferences: true, }, }, });
-
b963021: [Vite] rename
generateIndexFileoption toindex