Migrate to nuxt content v3. Change articles layout.
This commit is contained in:
19
content.config.ts
Normal file
19
content.config.ts
Normal 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(),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user