-
Notifications
You must be signed in to change notification settings - Fork 386
Expand file tree
/
Copy pathsource.config.ts
More file actions
42 lines (38 loc) · 1.07 KB
/
source.config.ts
File metadata and controls
42 lines (38 loc) · 1.07 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
import { defineDocs, defineCollections, defineConfig } from 'fumadocs-mdx/config'
import { z } from 'zod'
export const docs = defineDocs({
dir: 'content/docs',
})
export const blog = defineCollections({
type: 'doc',
dir: 'content/blog',
schema: z.object({
title: z.string(),
description: z.string().optional(),
date: z.string().or(z.date()),
author: z.string().optional(),
ogImage: z.string().optional(),
ogMetaImage: z.string().optional(),
ogImagePosition: z.string().optional(),
category: z.enum(['release', 'feature', 'guide', 'announcement']).optional(),
featured: z.boolean().optional(),
tags: z.array(z.string()).optional(),
}),
})
export const changelog = defineCollections({
type: 'doc',
dir: 'content/changelog',
schema: z.object({
title: z.string(),
description: z.string().optional(),
date: z.string().or(z.date()),
version: z.string().optional(),
ogImage: z.string().optional(),
}),
})
export default defineConfig({
mdxOptions: {
remarkCodeTabOptions: false,
remarkNpmOptions: false,
},
})