import { defineCollection } from "astro:content"; import { glob, file } from "astro/loaders"; import { z } from "astro/zod"; const gallery = defineCollection({ loader: glob({ pattern: "**/*.json", base: "./src/content/gallery" }), schema: ({ image }) => z.object({ image: image(), alt: z.string(), objposition: z.optional(z.string()), pub: z.coerce.date(), }), }); const buttonwall = defineCollection({ loader: file("src/content/bookmarks/buttonwall.json"), schema: ({ image }) => z.object({ default: image(), static: image().optional(), }), }); export const collections = { gallery, buttonwall };