Files
phundrak.com-frontend/content.config.ts

43 lines
868 B
TypeScript
Raw Permalink Normal View History

import { defineCollection, defineContentConfig } from '@nuxt/content';
import { z } from 'zod';
2025-11-11 19:12:21 +01:00
const commonSchema = z.object({
title: z.string(),
description: z.string()
});
export default defineContentConfig({
collections: {
content_en: defineCollection({
type: 'page',
source: {
2025-11-11 19:12:21 +01:00
include: 'en/**/*.md',
prefix: '',
},
schema: commonSchema,
}),
content_fr: defineCollection({
type: 'page',
source: {
2025-11-11 19:12:21 +01:00
include: 'fr/**/*.md',
prefix: '',
},
schema: commonSchema,
}),
2025-11-11 19:12:21 +01:00
content_data_en: defineCollection({
type: 'data',
source: {
2025-11-11 19:12:21 +01:00
include: 'en/**/*.json',
prefix: ''
},
}),
content_data_fr: defineCollection({
type: 'data',
source: {
include: 'fr/**/*.json',
prefix: ''
},
}),
},
});