Files
popov.link/src/content.config.ts

19 lines
490 B
TypeScript
Raw Normal View History

2026-04-09 08:47:37 +00:00
import { defineCollection } from "astro:content";
import { glob } from "astro/loaders";
import { z } from "astro/zod";
2024-09-04 21:16:37 +00:00
const blog = defineCollection({
2026-04-09 08:47:37 +00:00
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
2024-09-04 21:16:37 +00:00
schema: z.object({
basedOn: z.optional(z.string()),
dateModified: z.coerce.date(),
datePublished: z.coerce.date(),
2024-09-04 21:16:37 +00:00
description: z.string(),
2024-10-02 23:04:27 +00:00
draft: z.optional(z.boolean()),
lang: z.string(),
title: z.string(),
2024-09-04 21:16:37 +00:00
}),
});
export const collections = { blog };