Skip to content

Commit 96f51c9

Browse files
content config
1 parent d15d9df commit 96f51c9

File tree

1 file changed

+56
-4
lines changed

1 file changed

+56
-4
lines changed

src/content.config.ts

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,66 @@ const blogCollection = defineCollection({
1212
date: z.date(),
1313
lang: z.string().optional(),
1414
image: z.string().optional(),
15-
tags: z.array(z.string()),
16-
authors: z.array(z.string()),
17-
author_urls: z.array(z.string())
15+
ogImageUrl: z.string().optional()
16+
})
17+
})
18+
19+
const pressCollection = defineCollection({
20+
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/content/press' }),
21+
schema: z.object({
22+
title: z.string(),
23+
description: z.string(),
24+
publishDate: z.string(),
25+
slug: z.string(),
26+
publication: z.string().optional(),
27+
publicationLogo: z.string().optional(),
28+
externalUrl: z.string().optional(),
29+
featured: z.boolean().default(false),
30+
category: z.enum(['press-release', 'media-mention', 'announcement']).default('media-mention')
31+
})
32+
})
33+
34+
const grantTrackCollection = defineCollection({
35+
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/content/grant-tracks' }),
36+
schema: z.object({
37+
name: z.string(),
38+
amount: z.string(),
39+
description: z.string(),
40+
order: z.number().default(0)
41+
})
42+
})
43+
44+
const infoItemsCollection = defineCollection({
45+
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/content/info-items' }),
46+
schema: z.object({
47+
title: z.string(),
48+
content: z.string(),
49+
order: z.number().default(0)
50+
})
51+
})
52+
53+
const financialServicesPageCollection = defineCollection({
54+
loader: glob({
55+
pattern: '**/[^_]*.{md,mdx}',
56+
base: './src/content/financial-services'
57+
}),
58+
schema: z.object({
59+
heroTitle: z.string(),
60+
heroDescription: z.string(),
61+
introText: z.string(),
62+
ctaTitle: z.string(),
63+
ctaDescription: z.string().optional(),
64+
ctaEmailLabel: z.string(),
65+
ctaSubscribeLabel: z.string()
1866
})
1967
})
2068

2169
export const collections = {
2270
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
2371
i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }),
24-
blog: blogCollection
72+
blog: blogCollection,
73+
press: pressCollection,
74+
'grant-tracks': grantTrackCollection,
75+
'info-items': infoItemsCollection,
76+
'financial-services': financialServicesPageCollection
2577
}

0 commit comments

Comments
 (0)