mirror of
https://github.com/10h30/blog-balodeplao.git
synced 2026-05-12 15:21:15 +09:00
19 lines
557 B
TypeScript
19 lines
557 B
TypeScript
import { defineCollection, z } from "astro:content";
|
|
import { glob } from "astro/loaders";
|
|
|
|
const blog = defineCollection({
|
|
loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/blog" }),
|
|
schema: z.object({
|
|
title: z.string(),
|
|
description: z.string().optional(),
|
|
pubDate: z.coerce.date(),
|
|
author: z.string(),
|
|
image: z.string().optional(),
|
|
tags: z.array(z.string()).optional(),
|
|
categories: z.array(z.string()).optional(),
|
|
destination: z.array(z.string()).optional(),
|
|
}),
|
|
});
|
|
|
|
export const collections = { blog };
|