chore: typescript-a hobetzen du
This commit is contained in:
1 parent
cc9d1e0313
commit
b5e7ba5b45
7 files changed
+714
-8
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { defineCollection } from "astro:content";
|
||||
import { z } from "astro/zod";
|
||||
|
||||
import { glob } from "astro/loaders";
|
||||
|
||||
const posts = defineCollection({
|
||||
loader: glob({ pattern: "*.md", base: "./posts" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
slug: z.string(),
|
||||
description: z.string(),
|
||||
added: z.union([z.string(), z.date()]),
|
||||
updated: z.union([z.string(), z.date()]).optional(),
|
||||
tags: z.array(z.string()),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { posts };
|
||||
Reference in new issue
Block a user