-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.ts
More file actions
56 lines (51 loc) · 1.38 KB
/
Copy pathconfig.ts
File metadata and controls
56 lines (51 loc) · 1.38 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 { defineCollection, z } from 'astro:content';
const blogCollection = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
date: z.coerce.date(),
author: z.string().default('Ganesh Pagade'),
tags: z.array(z.string()).optional().default([]),
description: z.string().optional(),
draft: z.boolean().default(false),
}),
});
const notesCollection = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
date: z.coerce.date(),
tweet_url: z.string().url().optional(),
tweet_id: z.string().optional(),
screenshot: z.string().optional(),
}),
});
const caseStudiesCollection = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
company: z.string(),
role: z.string(),
period: z.string(),
technologies: z.array(z.string()),
summary: z.string(),
impact: z.string().optional(),
draft: z.boolean().default(false),
}),
});
const beyondTheCodeCollection = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
date: z.coerce.date(),
description: z.string().optional(),
heroImage: z.string().optional(),
draft: z.boolean().default(false),
}),
});
export const collections = {
blog: blogCollection,
notes: notesCollection,
'case-studies': caseStudiesCollection,
'beyondthecode': beyondTheCodeCollection,
};