-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsource.config.ts
More file actions
56 lines (53 loc) · 1.25 KB
/
source.config.ts
File metadata and controls
56 lines (53 loc) · 1.25 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { z } from "zod";
import { remarkImage, remarkMdxMermaid } from "fumadocs-core/mdx-plugins";
import lastModified from "fumadocs-mdx/plugins/last-modified";
import { remarkSteps, remarkNpm } from "fumadocs-core/mdx-plugins";
import {
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema,
} from "fumadocs-mdx/config";
export const docs = defineDocs({
dir: "content/docs",
docs: {
/**
* @see https://fumadocs.dev/docs/ui/llms
*/
postprocess: {
includeProcessedMarkdown: true,
},
schema: frontmatterSchema.extend({
preview: z.string().optional(),
index: z.boolean().default(false),
method: z.string().optional(),
}),
},
meta: {
schema: metaSchema.extend({
description: z.string().optional(),
}),
},
});
export const legal = defineDocs({
dir: "content/legal",
docs: {
schema: frontmatterSchema.extend({
title: z.string(),
slug: z.string().optional(),
}),
},
});
export default defineConfig({
plugins: [lastModified()],
mdxOptions: {
remarkPlugins: [
// https://www.fumadocs.dev/docs/headless/mdx/remark-image#example-without-imports
[remarkImage, { useImport: false }],
remarkMdxMermaid,
remarkSteps,
[remarkNpm, { persist: { id: "package-manager" } }],
],
rehypePlugins: (v) => [...v],
},
});