Some checks failed
Build and Check / Astro Check for Node.js 22 (push) Failing after 1m32s
Code quality / quality (push) Failing after 1m34s
Build and Check / Astro Check for Node.js 23 (push) Failing after 1m31s
Build and Check / Astro Build for Node.js 22 (push) Failing after 31s
Build and Check / Astro Build for Node.js 23 (push) Failing after 32s
29 lines
818 B
TypeScript
29 lines
818 B
TypeScript
import { defineCollection, z } from "astro:content";
|
|
|
|
const postsCollection = defineCollection({
|
|
schema: z.object({
|
|
title: z.string(),
|
|
published: z.date(),
|
|
updated: z.date().optional(),
|
|
draft: z.boolean().optional().default(false),
|
|
description: z.string().optional().default(""),
|
|
image: z.string().optional().default(""),
|
|
tags: z.array(z.string()).optional().default([]),
|
|
category: z.string().optional().nullable().default(""),
|
|
lang: z.string().optional().default(""),
|
|
|
|
/* For internal use */
|
|
prevTitle: z.string().default(""),
|
|
prevSlug: z.string().default(""),
|
|
nextTitle: z.string().default(""),
|
|
nextSlug: z.string().default(""),
|
|
}),
|
|
});
|
|
const specCollection = defineCollection({
|
|
schema: z.object({}),
|
|
});
|
|
export const collections = {
|
|
posts: postsCollection,
|
|
spec: specCollection,
|
|
};
|