Hexta AIHexta AI

Global Options

Customize Hexta MDX

Global Options

Shared options of Hexta MDX.

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

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

Prop

Type

MDX Options

Customize the default MDX preset.

source.config.ts
import { defineConfig } from 'hexta-mdx/config';
import rehypeKatex from 'rehype-katex';
import remarkMath from 'remark-math';

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

Or using the minimal preset:

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

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

How is this guide?