-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathcontent.config.ts
More file actions
96 lines (95 loc) · 2.49 KB
/
content.config.ts
File metadata and controls
96 lines (95 loc) · 2.49 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
export default defineContentConfig({
collections: {
blog: defineCollection({
source: 'blog/*.md',
type: 'page',
schema: z.object({
tags: z.array(z.string()),
image: z.string().optional(),
date: z.string(),
title: z.string(),
description: z.string(),
provider: z.string().optional(),
url: z.string().url().optional(),
ogimage: z.string().optional(),
published: z.boolean(),
canonical: z.string().url().optional(),
featured: z.boolean().optional()
})
}),
courses: defineCollection({
source: 'courses/*.md',
type: 'page',
schema: z.object({
title: z.string(),
date: z.string(),
description: z.string(),
url: z.string().url(),
image: z.string(),
provider: z.string(),
tags: z.array(z.string()),
platform: z.string()
})
}),
openSource: defineCollection({
source: 'open-source/*.md',
type: 'page',
schema: z.object({
title: z.string(),
date: z.string(),
description: z.string(),
url: z.string().url(),
image: z.string(),
tags: z.array(z.string())
})
}),
podcasts: defineCollection({
source: 'podcasts/*.md',
type: 'page',
schema: z.object({
title: z.string(),
date: z.string(),
description: z.string(),
url: z.string().url(),
image: z.string(),
tags: z.array(z.string()),
host: z.string(),
provider: z.string().default('cloudinary'),
featured: z.boolean().optional()
})
}),
tips: defineCollection({
source: 'tips/*.md',
type: 'page',
schema: z.object({
title: z.string(),
date: z.string(),
description: z.string(),
tags: z.array(z.string())
})
}),
videos: defineCollection({
source: 'videos/*.md',
type: 'page',
schema: z.object({
title: z.string(),
date: z.string(),
description: z.string(),
video: z.string(),
tags: z.array(z.string()),
host: z.string().optional(),
conference: z.string().optional(),
image: z.string(),
featured: z.boolean().optional()
})
}),
about: defineCollection({
source: 'about.md',
type: 'page',
schema: z.object({
title: z.string(),
}),
}),
}
})