-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.config.ts
More file actions
56 lines (55 loc) · 1.48 KB
/
Copy pathcontent.config.ts
File metadata and controls
56 lines (55 loc) · 1.48 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 { defineContentConfig, defineCollection, z } from '@nuxt/content'
export default defineContentConfig({
collections: {
blog: defineCollection({
type: 'page',
source: '10.blog/**/*.md',
schema: z.object({
title: z.string(),
description: z.string(),
category: z.string(),
tags: z.array(z.string()),
createdAt: z.date(),
updatedAt: z.date(),
thumbnail: z.string().optional(),
noindex: z.boolean().default(false),
draft: z.boolean().default(false),
})
}),
news: defineCollection({
type: 'page',
source: '100.news/**/*.md',
schema: z.object({
title: z.string(),
description: z.string(),
category: z.string(),
tags: z.array(z.string()),
createdAt: z.date(),
updatedAt: z.date(),
thumbnail: z.string().optional(),
draft: z.boolean().default(false),
noindex: z.boolean().default(false),
})
}),
docs: defineCollection({
type: 'page',
source: '0.docs/**/*.md',
schema: z.object({
title: z.string(),
description: z.string(),
category: z.string(),
createdAt: z.date(),
updatedAt: z.date(),
draft: z.boolean().default(false),
})
}),
pages: defineCollection({
type: 'page',
source: '*.md',
schema: z.object({
title: z.string().optional(),
description: z.string().optional(),
})
})
}
})