Files
Capital/content.config.ts
2025-07-30 01:09:46 +08:00

30 lines
807 B
TypeScript

import { defineCollection, defineContentConfig, z } from "@nuxt/content";
export default defineContentConfig({
collections: {
products: defineCollection({
type: "data",
source: "products/**.json",
schema: z.object({
icon: z.string(),
background: z.string().optional(),
name: z.string().nonempty(),
description: z.string().optional(),
url: z.string(),
repo: z.string().optional(),
releasedDate: z.date().optional(),
version: z.string().optional(),
updatedDate: z.date().optional(),
}),
}),
terms: defineCollection({
type: "page",
source: "terms/**.md",
schema: z.object({
title: z.string().nonempty(),
updatedDate: z.date().optional(),
}),
}),
},
});