This commit is contained in:
Felix Klement committed 2026-09-18 16:04:05 +02:00
commit 4cda1ca41b
72 files changed
+8169

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { glob } from 'astro/loaders';
const insights = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/insights' }),
schema: ({ image }) =>
z.object({
title: z.string(),
subtitle: z.string().optional(),
description: z.string(),
date: z.coerce.date(),
lang: z.enum(['en', 'de']),
category: z.string(),
readingTime: z.number().int().positive(),
author: z.string(),
authorRole: z.string(),
cover: image(),
coverAlt: z.string(),
tags: z.array(z.string()).default([]),
}),
});
export const collections = { insights };