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:
@@ -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,
|
||||
};
|
||||
Reference in New Issue
Block a user