import { file, glob } from "astro/loaders"; import { defineCollection, type z } from "astro:content"; //import { parse } from "@std/toml"; import { parse } from "toml"; import { Blog, Entity } from "./lib/collection/schemas.ts"; const blog = defineCollection({ loader: glob({ base: "./public/blog", pattern: "+([0-9a-z-]).md" }), schema: Blog, }); const entity = defineCollection({ loader: file("./src/content/entities.toml", { parser: (text) => parse(text).entities as z.infer[], }), schema: Entity, }); export const collections = { blog, entity };