mirror of
https://github.com/valentineus/popov.link.git
synced 2025-10-14 21:50:24 +03:00
- Eliminated the optional `preview` field from the blog post schema and configuration to streamline data handling. - Updated the blog post schema to utilize the default image directly from configuration, enhancing consistency in image representation.
17 lines
375 B
TypeScript
17 lines
375 B
TypeScript
import { defineCollection, z } from "astro:content";
|
|
|
|
const blog = defineCollection({
|
|
type: "content",
|
|
schema: z.object({
|
|
basedOn: z.optional(z.string()),
|
|
dateModified: z.coerce.date(),
|
|
datePublished: z.coerce.date(),
|
|
description: z.string(),
|
|
draft: z.optional(z.boolean()),
|
|
lang: z.string(),
|
|
title: z.string(),
|
|
}),
|
|
});
|
|
|
|
export const collections = { blog };
|