Something went wrong. Try again.
๐ little site of mines angelcube.dev
astro personal-site
Something went wrong. Try again.
1234567891011121314151617import { defineCollection } from "astro:content";import { glob } from "astro/loaders";import { z } from "astro/zod";
const journal = defineCollection({ loader: glob({ base: "./content/journal", pattern: "**/*.{md,mdx}" }), schema: z.object({ title: z.string(), description: z.string(), type: z.enum(["Writings", "Ramblings"]), published_date: z.string().transform((value) => Temporal.PlainDate.from(value)), updated_date: z.string().transform((value) => Temporal.PlainDate.from(value)), }),})
export const collections = { journal }