Migrate to nuxt content v3. Change articles layout.

This commit is contained in:
2025-03-15 19:57:25 +02:00
parent 5ad3e7b393
commit 64afeb8091
7 changed files with 947 additions and 510 deletions

19
content.config.ts Normal file
View File

@@ -0,0 +1,19 @@
import { defineCollection, defineContentConfig, z } from "@nuxt/content";
export default defineContentConfig({
collections: {
articles: defineCollection({
source: "articles/**/*.md",
type: "page",
schema: z.object({
title: z.string(),
date: z.date(),
coverImage: z.object({
author: z.string(),
authorUrl: z.string().url(),
url: z.string().url(),
}),
}),
}),
},
});