aboutsummaryrefslogtreecommitdiff
path: root/src/content.config.ts
blob: 4ba5c7c5fd370b1637050e020ad760db5968911b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { defineCollection } from "astro:content";
import { z } from 'astro/zod';
import { glob } from 'astro/loaders';
import { rssSchema } from '@astrojs/rss';

const blogCollection = defineCollection({
    loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/blog" }),
    schema: z.object({
        title: z.string(),
        description: z.string(),
        pubDate: z.date(),
        tags: z.array(z.string()),
    }),
});

export const collections = {
    blog: blogCollection,
};