Files
seans-cloud/src/content/config.ts
2025-12-14 22:18:10 +00:00

22 lines
539 B
TypeScript

import { defineCollection, z } from "astro:content";
const blog = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string().optional(),
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
draft: z.boolean().optional().default(false),
// Optional if you use hero images in your layout:
heroImage: z
.object({
src: z.string(),
alt: z.string().optional(),
})
.optional(),
}),
});
export const collections = { blog };