mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-29 21:28:15 +01:00
Add: nuxt content v3
This commit is contained in:
34
content.config.ts
Normal file
34
content.config.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { defineCollection, z } from '@nuxt/content'
|
||||
|
||||
export const collections = {
|
||||
main: defineCollection({
|
||||
type: 'page',
|
||||
source: 'home/*.md',
|
||||
}),
|
||||
portfolio: defineCollection({
|
||||
type: 'page',
|
||||
source: 'portfolio/*.md',
|
||||
schema: z.object({
|
||||
slug: z.string(),
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
publishedAt: z.date(),
|
||||
readingTime: z.number(),
|
||||
cover: z.string(),
|
||||
tags: z.array(z.string()),
|
||||
}),
|
||||
}),
|
||||
uses: defineCollection({
|
||||
type: 'data',
|
||||
source: 'uses/*.json',
|
||||
schema: z.object({
|
||||
name: z.string(),
|
||||
description: z.object({
|
||||
en: z.string(),
|
||||
fr: z.string(),
|
||||
es: z.string(),
|
||||
}),
|
||||
category: z.string(),
|
||||
}),
|
||||
}),
|
||||
}
|
||||
Reference in New Issue
Block a user