First version with notes

This commit is contained in:
Vyn 2025-06-12 11:59:23 +02:00
parent cb91e02327
commit 86aef1608b
Signed by: vyn
GPG key ID: E1B2BE34E7A971E7
45 changed files with 7075 additions and 0 deletions

19
content.config.ts Normal file
View file

@ -0,0 +1,19 @@
// 1. Import utilities from `astro:content`
import { defineCollection, z } from "astro:content";
// 2. Import loader(s)
import { glob, file } from "astro/loaders";
// 3. Define your collection(s)
const notes = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/notes" }),
schema: z.object({
slug: z.string(),
title: z.string(),
createdAt: z.coerce.date(),
updatedAt: z.coerce.date(),
}),
});
// 4. Export a single `collections` object to register your collection(s)
export const collections = { notes };