24 lines
463 B
TypeScript
24 lines
463 B
TypeScript
import { z, defineCollection } from "astro:content";
|
|
|
|
const blogCollection = defineCollection({
|
|
schema: z.object({
|
|
title: z.string(),
|
|
description: z.string(),
|
|
dir: z.string(),
|
|
image: z.string(),
|
|
fileType: z.optional(
|
|
z.union([
|
|
z.literal("jpg"),
|
|
z.literal("jpeg"),
|
|
z.literal("gif"),
|
|
z.literal("png"),
|
|
])
|
|
),
|
|
date: z.date(),
|
|
}),
|
|
});
|
|
|
|
export const collections = {
|
|
blog: blogCollection,
|
|
};
|