* chore(deps): bump version, follow upstream changes * chore: lint code * chore(deps): remove dotenv * fix: install * ci: unlock node version
40 lines
1017 B
TypeScript
40 lines
1017 B
TypeScript
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(),
|
|
}),
|
|
],
|
|
},
|
|
},
|
|
})
|