-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathsource.config.ts
49 lines (46 loc) · 1.23 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
import { remarkHeading, remarkImage } from "fumadocs-core/mdx-plugins"
import { defineCollections, defineConfig, defineDocs, frontmatterSchema } from "fumadocs-mdx/config"
import { z } from "zod"
export const { docs, meta } = defineDocs({
dir: "resources/content/docs",
docs: {
async: false,
schema: frontmatterSchema.extend({
title: z.string(),
description: z.string(),
references: z.array(z.string()).optional(),
status: z.string().optional(),
}),
},
meta: {
schema: frontmatterSchema.extend({
title: z.string(),
slug: z.string(),
description: z.string(),
}),
},
})
export const blog = defineCollections({
type: "doc",
dir: "resources/content/blog",
schema: z.object({
title: z.string(),
description: z.string(),
published: z.date(),
author: z.string().optional(),
}),
})
export default defineConfig({
mdxOptions: {
rehypeCodeOptions: {
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark",
},
langs: ["ts", "tsx", "js", "jsx", "json", "css", "html", "md", "mdx"],
defaultLanguage: "tsx",
},
remarkPlugins: [[remarkHeading, { generateToc: true }], remarkImage],
},
})