-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsource.config.ts
More file actions
56 lines (52 loc) · 1.28 KB
/
source.config.ts
File metadata and controls
56 lines (52 loc) · 1.28 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 {
defineDocs,
defineConfig,
defineCollections,
frontmatterSchema,
} from 'fumadocs-mdx/config';
import { z } from 'zod';
import { remarkInstall } from 'fumadocs-docgen';
export const { docs, meta } = defineDocs({
dir: 'content/docs',
});
export const blog = defineCollections({
dir: 'content/blog',
type: 'doc',
schema: frontmatterSchema.extend({
title: z.string(),
description: z.string(),
date: z.string().date().or(z.date()),
image: z.string().optional(),
imageTitle: z.string().optional(),
tags: z.array(z.string()).default([]),
authors: z.array(z.string()).default([]),
faq: z
.array(
z.object({
question: z.string(),
answer: z.string(),
}),
)
.optional(),
}),
});
export const aiQuickReference = defineCollections({
dir: 'content/ai-quick-reference',
type: 'meta',
schema: frontmatterSchema.extend({
title: z.string(),
description: z.string(),
category: z.string(),
keywords: z.array(z.string()).default([]),
content: z.string(),
}),
});
export default defineConfig({
lastModifiedTime: 'git',
mdxOptions: {
remarkPlugins: [remarkInstall],
remarkImageOptions: {
external: process.env.DOCKER_BUILD === 'true' ? false : undefined,
},
},
});