Skip to Content
Fumadocs

Global Options

Customize Fumadocs MDX

Global options of Fumadocs MDX, like the MDX plugins of every collection, go in source.config.ts at the project root. The file is optional, and works with collections defined by the Macro API in lib/source.ts.

Global Options

source.config.ts
import { defineConfig } from 'fumadocs-mdx/config';

export default defineConfig({
  // global options
});

Prop

Type

MDX Options

Customize the default preset of collections. mdxOptions applies to collections compiled with unified, and satteriOptions to collections with compiler: 'satteri'.

source.config.ts
import { defineConfig } from 'fumadocs-mdx/config';
import { myPlugin } from './remark-plugin';

export default defineConfig({
  mdxOptions: {
    // When order matters
    remarkPlugins: (v) => [myPlugin, ...v],
  },
});

Or using the minimal preset:

source.config.ts
import { defineConfig } from 'fumadocs-mdx/config';

export default defineConfig({
  mdxOptions: {
    preset: 'minimal',
    // now it accepts only MDX processor options
  },
});

How is this guide?