import { rehypeCodeDefaultOptions } from 'fumadocs-core/mdx-plugins' import { defineConfig, defineDocs, frontmatterSchema, metaSchema, } from 'fumadocs-mdx/config' import { transformerTwoslash } from 'fumadocs-twoslash' import { createFileSystemTypesCache } from 'fumadocs-twoslash/cache-fs' // You can customize Zod schemas for frontmatter and `meta.json` here // see https://fumadocs.vercel.app/docs/mdx/collections#define-docs export const docs = defineDocs({ docs: { postprocess: { includeProcessedMarkdown: true }, schema: frontmatterSchema, }, meta: { schema: metaSchema, }, }) export default defineConfig({ mdxOptions: { rehypeCodeOptions: { langs: ['bash', 'js', 'jsx', 'ts', 'tsx'], themes: { dark: 'github-dark', light: 'github-light', }, transformers: [ ...(rehypeCodeDefaultOptions.transformers ?? []), transformerTwoslash({ typesCache: createFileSystemTypesCache(), }), ], }, }, })