-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathcontent.config.ts
More file actions
37 lines (36 loc) · 922 Bytes
/
Copy pathcontent.config.ts
File metadata and controls
37 lines (36 loc) · 922 Bytes
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
import { defineContentConfig, defineCollection, z } from '@nuxt/content';
export default defineContentConfig({
collections: {
landing: defineCollection({
type: 'page',
source: 'index.md',
}),
content: defineCollection({
type: 'page',
source: {
include: '**',
exclude: ['index.md'],
},
schema: z.object({
title: z.string(),
description: z.string().optional(),
headline: z.string().optional(),
stableId: z.string().uuid().optional(),
authors: z.array(z.object({
name: z.string(),
title: z.string(),
})).optional(),
icon: z.string().optional(),
technologies: z.array(z.string()).optional(),
section: z.enum(['start-here', 'guides']).optional(),
links: z.array(z.object({
label: z.string(),
icon: z.string(),
to: z.string(),
target: z.string().optional(),
})).optional(),
rawbody: z.string(),
}),
}),
},
});