25 lines
614 B
TypeScript
25 lines
614 B
TypeScript
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
|
|
|
|
const blogSchema = z.object({
|
|
title: z.string(),
|
|
description: z.string(),
|
|
date: z.string(),
|
|
tags: z.array(z.string()).optional(),
|
|
image: z.string().optional(),
|
|
})
|
|
|
|
export default defineContentConfig({
|
|
collections: {
|
|
blog_fr: defineCollection({
|
|
type: 'page',
|
|
source: { include: 'fr/blog/**/*.md', prefix: '/fr/blog' },
|
|
schema: blogSchema,
|
|
}),
|
|
blog_en: defineCollection({
|
|
type: 'page',
|
|
source: { include: 'en/blog/**/*.md', prefix: '/en/blog' },
|
|
schema: blogSchema,
|
|
}),
|
|
},
|
|
})
|