diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-27 20:50:16 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-27 20:51:48 +0300 |
| commit | 7ebc72f3f5de24a293db144cd1745cea52c3e717 (patch) | |
| tree | 355a1c7c04a69af7023cc8afa7ee675596687253 /website/src/content.config.ts | |
| parent | 4ec4d56fcf985e4464bce6b76e3578e9c941ad50 (diff) | |
feat: add website release notes
Diffstat (limited to 'website/src/content.config.ts')
| -rw-r--r-- | website/src/content.config.ts | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/website/src/content.config.ts b/website/src/content.config.ts index 6282421b..c9a9b8fd 100644 --- a/website/src/content.config.ts +++ b/website/src/content.config.ts @@ -1,4 +1,5 @@ -import { defineCollection } from 'astro:content'; +import { defineCollection, z } from 'astro:content'; +import { glob } from 'astro/loaders'; import { docsLoader } from '@astrojs/starlight/loaders'; import { docsSchema } from '@astrojs/starlight/schema'; @@ -9,4 +10,24 @@ function docsPath({ entry }: { entry: string }) { export const collections = { docs: defineCollection({ loader: docsLoader({ generateId: docsPath }), schema: docsSchema() }), + blog: defineCollection({ + loader: glob({ pattern: '*.md', base: './src/content/blog' }), + schema: z.object({ + title: z.string(), + description: z.string(), + date: z.coerce.date(), + draft: z.boolean().default(false), + }), + }), + releases: defineCollection({ + loader: glob({ pattern: '*.md', base: './src/content/releases' }), + schema: z.object({ + title: z.string(), + version: z.string(), + path: z.string(), + description: z.string(), + date: z.coerce.date(), + draft: z.boolean().default(false), + }), + }), }; |
