-
Notifications
You must be signed in to change notification settings - Fork 65
/
source.config.ts
36 lines (33 loc) · 938 Bytes
/
source.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { remarkDocGen, fileGenerator } from "fumadocs-docgen";
import { defineCollections, defineConfig } from "fumadocs-mdx/config";
import { z } from "zod";
export const posts = defineCollections({
dir: "content/posts",
schema: z.object({
title: z.string(),
description: z.string().optional(),
date: z.string().date().or(z.date()).optional(),
}),
type: "doc",
});
export const lab = defineCollections({
dir: "content/lab",
schema: z.object({
title: z.string(),
description: z.string().optional(),
date: z.string().date().or(z.date()).optional(),
}),
type: "doc",
});
export default defineConfig({
mdxOptions: {
rehypeCodeOptions: {
inline: "tailing-curly-colon",
themes: {
light: "catppuccin-latte",
dark: "catppuccin-mocha",
},
},
remarkPlugins: [[remarkDocGen, { generators: [fileGenerator()] }]],
},
});