nuxt初始化
This commit is contained in:
34
nuxt-web/content.config.ts
Normal file
34
nuxt-web/content.config.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
|
||||
|
||||
export default defineContentConfig({
|
||||
collections: {
|
||||
news: defineCollection({
|
||||
type: 'page',
|
||||
source: 'news/*.md',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
date: z.string(),
|
||||
slug: z.string(),
|
||||
summary: z.string(),
|
||||
cover: z.string(),
|
||||
keywords: z.string(),
|
||||
description: z.string()
|
||||
})
|
||||
}),
|
||||
cases: defineCollection({
|
||||
type: 'page',
|
||||
source: 'cases/*.md',
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
slug: z.string(),
|
||||
summary: z.string(),
|
||||
cover: z.string(),
|
||||
industry: z.string(),
|
||||
categories: z.array(z.string()),
|
||||
relatedProducts: z.array(z.string()),
|
||||
keywords: z.string(),
|
||||
description: z.string()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user