-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontent.config.ts
More file actions
38 lines (37 loc) · 981 Bytes
/
Copy pathcontent.config.ts
File metadata and controls
38 lines (37 loc) · 981 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
38
import {
defineCollection,
defineContentConfig,
z,
} from '@nuxt/content'
export default defineContentConfig({
collections: {
sponsorLevels: defineCollection({
type: 'data',
source: 'sponsorLevels/*.md',
// Define custom schema for docs collection
schema: z.object({
level: z.string(),
name: z.string(),
title: z.string(),
color: z.string(),
image: z.string().optional(),
description: z.string().optional(),
}),
indexes: [
{ columns: ['level'], unique: true },
],
}),
global: defineCollection({
// Specify the type of content in this collection
type: 'data',
// Load every file inside the `content` directory
source: 'global/*.mdc',
}),
docs: defineCollection({
// Specify the type of content in this collection
type: 'page',
// Load every file inside the `content` directory
source: '**',
}),
},
})