20 lines
464 B
TypeScript
20 lines
464 B
TypeScript
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(),
|
|
}),
|
|
}),
|
|
}),
|
|
},
|
|
});
|