# Fumadocs MDX (the built-in content source): Global Options
URL: /docs/mdx/global
Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/mdx/global.mdx

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](/docs/mdx/macro) in `lib/source.ts`.

## Global Options [#global-options]

```ts title="source.config.ts"
import { defineConfig } from 'fumadocs-mdx/config';

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

### GlobalConfig

| Prop                      | Type                                                                             | Description                                                                                                                                                                       |
| ------------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `plugins?`                | `PluginOption[] \| undefined`                                                    |                                                                                                                                                                                   |
| `compiler?`               | `"mdx" \| "satteri" \| undefined`                                                | The compiler for files compiled without a collection (e.g. `page.mdx` routes). Collections choose their own compiler via the collection-level `compiler` option. Default: `'mdx'` |
| `mdxOptions?`             | `(() => Promise<MDXPresetOptions>) \| MDXPresetOptions \| undefined`             | Configure global MDX options, used by `doc` collections with the default MDX compiler.                                                                                            |
| `satteriOptions?`         | `SatteriOptionsInput`                                                            | Configure global Sätteri options, used by `doc` collections with `compiler: "satteri"`.                                                                                           |
| `workspaces?`             | `Record<string, { dir: string; config: Record<string, unknown>; }> \| undefined` |                                                                                                                                                                                   |
| `experimentalBuildCache?` | `string \| undefined`                                                            |                                                                                                                                                                                   |

### MDX Options [#mdx-options]

Customize the [default preset](/docs/mdx/mdx) of collections. `mdxOptions` applies to collections compiled with unified, and `satteriOptions` to collections with `compiler: 'satteri'`.

```ts tab="unified" title="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],
  },
});
```

```ts tab="Sätteri" title="source.config.ts"
import { defineConfig } from 'fumadocs-mdx/config';
import { myPlugin } from './mdast-plugin';

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

Or using the minimal preset:

```ts tab="unified" title="source.config.ts"
import { defineConfig } from 'fumadocs-mdx/config';

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

```ts tab="Sätteri" title="source.config.ts"
import { defineConfig } from 'fumadocs-mdx/config';

export default defineConfig({
  satteriOptions: {
    preset: 'minimal',
    // now it accepts only Sätteri compile options
  },
});
```