Upgraded to Astro 5.2.5 and fixed content collections

This commit is contained in:
Firq 2025-02-06 19:08:51 +01:00
parent 298b91262e
commit eec488ddff
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
28 changed files with 290 additions and 198 deletions

17
src/content.config.ts Normal file
View file

@ -0,0 +1,17 @@
import { z, defineCollection } from 'astro:content'
import { glob } from 'astro/loaders';
const blogCollection = defineCollection({
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/data/blog" }),
schema: z.object({
title: z.string(),
tags: z.array(z.string()),
pubDate: z.date(),
description: z.string(),
author: z.string(),
}),
})
export const collections = {
blog: blogCollection,
}