Files
shadcn/app/source.config.ts

40 lines
752 B
TypeScript

import {
defineConfig,
defineDocs,
frontmatterSchema,
} from "@hanzo/docs-mdx/config"
import rehypePrettyCode from "rehype-pretty-code"
import { z } from "zod"
export default defineConfig({
mdxOptions: {
rehypePlugins: [
[
rehypePrettyCode,
{
theme: {
dark: "github-dark",
light: "github-light-default",
},
keepBackground: false,
},
],
],
},
})
export const docs = defineDocs({
dir: "content/docs",
docs: {
schema: frontmatterSchema.extend({
links: z
.object({
doc: z.string().optional(),
api: z.string().optional(),
})
.optional(),
toc: z.boolean().optional(),
}),
},
})