-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.config.ts
More file actions
53 lines (51 loc) · 1.18 KB
/
content.config.ts
File metadata and controls
53 lines (51 loc) · 1.18 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
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
// export const collections = {
// }
export default defineContentConfig({
collections: {
content: defineCollection({
type: 'page',
source: '**/*.md',
}),
blog: defineCollection({
type: 'page',
source: 'blog/**',
// Define custom schema for docs collection
schema: z.object({
tags: z.array(z.string()),
image: z.string(),
date: z.date(),
}),
}),
components: defineCollection({
source: 'components/**.yml',
type: 'data',
schema: z.object({
name: z.string(),
thumbnail: z.string(),
url: z.string(),
}),
}),
authors: defineCollection({
type: 'data',
source: 'authors/**.yml',
schema: z.object({
name: z.string(),
avatar: z.string(),
url: z.string(),
}),
}),
people: defineCollection({
type: 'data',
source: 'people/**.json',
schema: z.object({
name: z.string(),
data: z.object({
name: z.string(),
email: z.string(),
image: z.string(),
}),
}),
}),
},
})