Convert blog posts from .md to .mdoc format for KeyStatic

- Convert all 32 blog posts to .mdoc format
- Add content.config.ts to handle .mdoc files in Astro
- This allows KeyStatic to find and manage the blog posts

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Buğra Canata
2026-01-17 22:43:59 +03:00
parent 1aba559075
commit b62715c7d8
33 changed files with 20 additions and 85 deletions
+20
View File
@@ -0,0 +1,20 @@
import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';
const post = defineCollection({
loader: glob({ pattern: '**/*.mdoc', base: './src/data/post' }),
schema: z.object({
title: z.string(),
date: z.date(),
author: z.string().default('TA1SPH'),
categories: z.array(z.string()).default([]),
tags: z.array(z.string()).default([]),
layout: z.string().default('post'),
image: z.string().optional(),
excerpt: z.string().optional(),
}),
});
export const collections = {
post,
};