Working blog

This commit is contained in:
Pablo Moyano 2023-10-08 03:01:38 +02:00
parent a7203010bf
commit 05617a5302
1 changed files with 15 additions and 0 deletions

15
src/content/config.ts Normal file
View File

@ -0,0 +1,15 @@
import { defineCollection, z } from "astro:content";
const blogCollection = defineCollection({
schema: ({ image }) => z.object({
title: z.string(),
cover: image().refine((img) => img.width >= 1080, {
message: "Cover image must be at least 1080 pixels wide!",
}),
coverAlt: z.string(),
}),
});
export const collections = {
blog: blogCollection,
};