summaryrefslogtreecommitdiff
path: root/src/content.config.ts
blob: af3f25d1603b1a64e682b49b6d4f09049aa3dd47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { glob } from 'astro/loaders';
import { defineCollection, z } from 'astro:content';

const news = defineCollection({
  loader: glob({ pattern: '**/*.(md|mdx|html)', base: './src/content/news' }),
  schema: z.object({
    title: z.string(),
    summary: z.string(),
  }),
});

export const collections = {
  news,
};