Files
ghall.space/src/content/config.ts
T
2024-01-24 12:31:39 -05:00

30 lines
501 B
TypeScript

import { z, defineCollection } from 'astro:content';
const blogCollection = defineCollection({
schema: z.object({
title: z.string(),
pubDate: z.string().transform((str) => new Date(str)),
tags: z.array(
z.enum([
'Apps',
'Gaming',
'Learning',
'Life',
'MacOS',
'Music',
'Making Stuff',
'Mental Health',
'Movies & TV',
'Programming',
'Tech',
'Tutorial',
'Web Dev',
])
),
}),
});
export const collections = {
blog: blogCollection,
};