-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.config.ts
33 lines (32 loc) · 979 Bytes
/
content.config.ts
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
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
export default defineContentConfig({
collections: {
blog: defineCollection({
source: 'blog/*.md',
type: 'page',
// Define custom schema for docs collection
schema: z.object({
title: z.string(),
description: z.string(),
published_at: z.string().date().nullable(),
tags: z.array(z.string()),
cover_image: z.string().nullable(),
}),
}),
projects: defineCollection({
source: 'projects/*.md',
type: 'page',
// Define custom schema for docs collection
schema: z.object({
title: z.string(),
description: z.string(),
state: z.enum(['ACTIVE', 'INACTIVE']),
cover_image: z.string().nullable(),
visuals: z.array(z.string()),
tech: z.array(z.string()),
wdid: z.array(z.string()),
links: z.array(z.string()).nullable(),
}),
}),
},
})