Files
joeac.net/website/src/content.config.ts
T
2026-03-21 22:23:45 +00:00

20 lines
466 B
TypeScript

import { glob } from "astro/loaders";
import { defineCollection } from "astro:content";
import { z } from "astro/zod";
const blog = defineCollection({
loader: glob({
pattern: "**/*.(md|mdx|gmi|html)",
base: "./src/content/blog",
}),
schema: z.object({
title: z.string(),
hidden: z.optional(z.boolean()),
description: z.string(),
pubDate: z.date(),
updatedDate: z.optional(z.date()),
}),
});
export const collections = { blog };