Files
popov.link/src/content.config.ts
Valentin Popov f90592d8a1
All checks were successful
Test / npm test (push) Successful in 54s
Test / npm test (pull_request) Successful in 46s
feat: migrated to Astro 6
2026-04-09 08:47:37 +00:00

19 lines
490 B
TypeScript

import { defineCollection } from "astro:content";
import { glob } from "astro/loaders";
import { z } from "astro/zod";
const blog = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
schema: z.object({
basedOn: z.optional(z.string()),
dateModified: z.coerce.date(),
datePublished: z.coerce.date(),
description: z.string(),
draft: z.optional(z.boolean()),
lang: z.string(),
title: z.string(),
}),
});
export const collections = { blog };