| 1 | import { defineCollection, defineConfig } from '@content-collections/core' |
| 2 | import { compileMarkdown } |
| 3 | import { z } |
| 4 | |
| 5 | const changelog = defineCollection |
| 6 | name: 'changelog', |
| 7 | directory: 'content/changelog', |
| 8 | include: '**/*.md', |
| 9 | schema: z.object |
| 10 | title: z.string |
| 11 | description: z.string |
| 12 | date: z.string |
| 13 | version: z.string |
| 14 | content: z.string |
| 15 | }), |
| 16 | transform: async ( |
| 17 | const html = |
| 18 | return { |
| 19 | ...doc, |
| 20 | slug: doc._meta |
| 21 | html, |
| 22 | } |
| 23 | }, |
| 24 | }) |
| 25 | |
| 26 | export default defineConfig({ |
| 27 | content: [changelog], |
| 28 | }) |