wf4/content.config.ts
webfussel d6859cdaad add: SEO for articles
SEO and SchemaORg for articles
2025-07-11 13:32:59 +02:00

34 lines
No EOL
805 B
TypeScript

import { defineContentConfig, defineCollection, z } from '@nuxt/content'
import { asSchemaOrgCollection } from 'nuxt-schema-org/content'
export default defineContentConfig({
collections: {
blog: defineCollection(asSchemaOrgCollection({
type: 'page',
source: 'blog/*.md',
schema: z.object({
date: z.string(),
image: z.string(),
thumbnail: z.string(),
category: z.string(),
author: z.object({
name: z.string(),
image: z.string(),
}),
}),
})),
skills: defineCollection({
type: 'page',
source: 'snippets/skills/*.md',
}),
faq: defineCollection({
type: 'page',
source: 'snippets/faq/*.md',
schema: z.object({
rawbody: z.string(),
}),
}),
},
})