-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.config.ts
More file actions
40 lines (38 loc) · 873 Bytes
/
Copy pathsource.config.ts
File metadata and controls
40 lines (38 loc) · 873 Bytes
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 { rehypeCode } from "fumadocs-core/mdx-plugins";
import {
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema,
} from "fumadocs-mdx/config";
import jsonSchema from "fumadocs-mdx/plugins/json-schema";
import lastModified from "fumadocs-mdx/plugins/last-modified";
import { z } from "zod";
// You can customise Zod schemas for frontmatter and `meta.json` here
// see https://fumadocs.dev/docs/mdx/collections#define-docs
export const docs = defineDocs({
docs: {
schema: frontmatterSchema,
postprocess: {
includeProcessedMarkdown: true,
},
async: true,
},
meta: {
schema: metaSchema.extend({
description: z.string().optional(),
}),
},
});
export default defineConfig({
plugins: [
jsonSchema({
insert: true,
}),
lastModified(),
],
// lastModifiedTime: "git",
mdxOptions: {
rehypePlugins: (v) => [rehypeCode, ...v],
},
});