forked from directus/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.config.ts
More file actions
35 lines (34 loc) · 820 Bytes
/
content.config.ts
File metadata and controls
35 lines (34 loc) · 820 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
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(),
authors: z.array(z.object({
name: z.string(),
title: z.string(),
})).optional(),
icon: z.string().optional(),
technologies: z.array(z.string()).optional(),
links: z.array(z.object({
label: z.string(),
icon: z.string(),
to: z.string(),
target: z.string().optional(),
})).optional(),
rawbody: z.string(),
}),
}),
},
});