forked from intentui/intentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.config.ts
More file actions
40 lines (37 loc) · 1.05 KB
/
source.config.ts
File metadata and controls
40 lines (37 loc) · 1.05 KB
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
import { remarkHeading, remarkImage } from "fumadocs-core/mdx-plugins"
import { defineCollections, defineConfig, defineDocs, frontmatterSchema } from "fumadocs-mdx/config"
import { z } from "zod"
import { app } from "@/config/app";
export const { docs, meta } = defineDocs({
dir: "src/content/docs",
docs: {
async: false,
schema: frontmatterSchema.extend({
title: z.string(),
description: z.string(),
references: z.array(z.string()).optional(),
status: z.string().optional(),
}),
},
})
export const blog = defineCollections({
type: "doc",
dir: "src/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: app.editorThemes,
langs: ["ts", "tsx", "json", "css", "bash", "toml"],
defaultLanguage: "tsx",
},
remarkPlugins: [[remarkHeading, { generateToc: true }], remarkImage],
},
})