Initialize project with general functionality

This commit is contained in:
thiloho
2025-04-26 09:13:54 +02:00
commit 69be9d8ab7
42 changed files with 6368 additions and 0 deletions

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

@@ -0,0 +1,23 @@
import { defineCollection, z } from "astro:content";
import { glob } from "astro/loaders";
const index = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/index" }),
});
const blog = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
schema: z.object({
id: z.number().positive(),
title: z.string(),
description: z.string(),
pubDate: z.coerce.date(),
modDate: z.coerce.date().optional(),
}),
});
const legal = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/legal" }),
});
export const collections = { index, blog, legal };