at main 1.2 kB view raw
1import { defineCollection, defineContentConfig, z } from "@nuxt/content"; 2import { asOgImageCollection } from "nuxt-og-image/content"; 3 4export default defineContentConfig({ 5 collections: { 6 pages: defineCollection({ 7 type: "page", 8 source: "pages/**/*.md", 9 schema: z.object({}) 10 }), 11 posts: defineCollection( 12 asOgImageCollection({ 13 type: "page", 14 source: { 15 include: "posts/**/*.md" 16 }, 17 schema: z.object({ 18 title: z.string(), 19 description: z.string(), 20 date: z.string().date(), 21 updated: z.string().date().optional(), 22 authors: z.array( 23 z.object({ 24 name: z.string(), 25 avatar: z.string().optional() 26 }) 27 ), 28 tags: z.array(z.string()), 29 published: z.boolean().optional(), 30 bskyCid: z.string().optional() 31 }) 32 }) 33 ) 34 } 35});