start working on posts with placeholder content
This commit is contained in:
19
src/content.config.ts
Normal file
19
src/content.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
import { z } from 'astro/zod';
|
||||
|
||||
|
||||
const posts = defineCollection({
|
||||
loader: glob({ pattern: '*.mdx', base: './posts' }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
date: z.date(),
|
||||
draft: z.boolean().default(false),
|
||||
dropcap: z.boolean().default(true),
|
||||
toc: z.boolean().default(true),
|
||||
})
|
||||
});
|
||||
|
||||
export const collections = { posts };
|
||||
Reference in New Issue
Block a user