-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathsource.config.ts
More file actions
49 lines (45 loc) · 1.02 KB
/
source.config.ts
File metadata and controls
49 lines (45 loc) · 1.02 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
import { defineConfig, defineDocs, frontmatterSchema, metaSchema } from 'fumadocs-mdx/config'
// import lastModified from 'fumadocs-mdx/plugins/last-modified'
import { z } from 'zod'
export default defineConfig({
// plugins: [lastModified()],
mdxOptions: {
},
})
// You can customise Zod schemas for frontmatter and `meta.json` here
// see https://fumadocs.vercel.app/docs/mdx/collections#define-docs
export const guides = defineDocs({
dir: './content/guides',
docs: {
schema: frontmatterSchema,
},
meta: {
schema: metaSchema,
},
})
export const reference = defineDocs({
dir: './content/reference',
docs: {
schema: frontmatterSchema,
},
meta: {
schema: metaSchema,
},
})
export const blog = defineDocs({
dir: './content/blog',
docs: {
files: [
'**/*.mdx',
'!weekly-*.mdx',
],
schema: frontmatterSchema.extend({
author: z.string(),
date: z.iso.date().or(z.date()),
deprecated: z.boolean().optional(),
}),
},
meta: {
schema: metaSchema,
},
})