Repository navigation
Expand file tree
/
Copy pathcontent.config.ts
More file actions
60 lines (59 loc) · 1.46 KB
/
Copy pathcontent.config.ts
File metadata and controls
60 lines (59 loc) · 1.46 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
57
58
59
60
import { defineContentConfig, defineCollection } from '@nuxt/content';
import { z } from 'zod';
export default defineContentConfig({
collections: {
content: defineCollection({
type: 'page',
source: '**/*.md',
}),
research: defineCollection({
type: 'page',
schema: z.object({
title: z.string(),
meta: z.object({
title: z.string(),
title_link: z.string().optional(),
links: z.array(
z.object({
label: z.string(),
link: z.string(),
}),
),
coauthors: z.array(
z.object({
coauthor: z.object({
name: z.string(),
link: z.string().optional(),
}),
}),
),
cta: z.string().optional(),
date: z.string().optional(),
type: z.string(),
infos: z
.array(
z.object({
info: z.string(),
}),
)
.optional(),
}),
}),
source: 'research/*.md',
}),
teaching: defineCollection({
type: 'page',
schema: z.object({
meta: z.object({
subject: z.string(),
institution: z.string().optional(),
role: z.string(),
semester: z.string(),
degree: z.string(),
date: z.string().optional(),
}),
}),
source: 'teaching/*.md',
}),
},
});