Files
shadcn-ui/apps/v4/source.config.ts
shadcn 65223896da feat: layout toggle (#7515)
* feat: implement fixed layout

* feat: track layout

* fix
2025-05-31 14:21:19 +04:00

47 lines
983 B
TypeScript

import {
defineConfig,
defineDocs,
frontmatterSchema,
} from "fumadocs-mdx/config"
import rehypePrettyCode from "rehype-pretty-code"
import { z } from "zod"
import { transformers } from "@/lib/highlight-code"
export default defineConfig({
mdxOptions: {
rehypePlugins: (plugins) => {
plugins.shift()
plugins.push([
// TODO: fix the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
rehypePrettyCode as any,
{
theme: {
dark: "github-dark",
light: "github-light-default",
},
transformers,
},
])
return plugins
},
},
})
export const docs = defineDocs({
dir: "content/docs",
docs: {
// @ts-expect-error - TODO: fix the type.
schema: frontmatterSchema.extend({
links: z
.object({
doc: z.string().optional(),
api: z.string().optional(),
})
.optional(),
}),
},
})