initial
This commit is contained in:
commit
4cda1ca41b
72 files changed
+8169
No files matched your search
@@ -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 };
|
||||
Reference in new issue
Block a user