Something went wrong. Try again.
a collection of early likes.fyi prototypes, preserved here for historical purposes prototypes.likes.fyi
Something went wrong. Try again.
437 B · 20 lines
TypeScript
at main
123456789101112131415161718192021import { defineCollection } from "astro:content";import { glob } from "astro/loaders";import { z } from "astro/zod";
const pages = defineCollection({ loader: glob({ base: "./src/content", pattern: [ "*/*.{md,mdx}", "*.{md,mdx}", ]}),
schema: z.object({ title: z.string(), subtitle: z.string(), date: z.iso.date(),
settings: z.looseObject({}).optional(), })});
export const collections = { pages };