blob: 1c24b41f4f7af11837b43b99f86b9177dda6ee22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { glob } from 'astro/loaders';
import { defineCollection, z } from 'astro:content';
const blog = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: "src/data/blog" }),
schema: z.object({
title: z.string(),
metaDescription: z.string(),
publishedAt: z.coerce.date()
})
});
const portfolio = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: "src/data/portfolio" }),
schema: z.object({
title: z.string(),
description: z.string(),
technologies: z.array(z.string())
})
})
export const collections = {
blog,
portfolio
};
|