f**k ahh syling and gallery work

This commit is contained in:
Aria 2025-04-25 04:23:45 +10:00
parent 3bf39af153
commit eedba4c364
19 changed files with 165 additions and 19 deletions

View file

@ -1,7 +1,9 @@
// Import utilities from `astro:content`
import { defineCollection, z } from "astro:content";
// Import the glob loader
import { glob } from "astro/loaders";
// Define a `loader` and `schema` for each collection
const blog = defineCollection({
loader: glob({ pattern: "**/[^_]*.{md,mdx}", base: "./src/blog" }),
@ -13,5 +15,16 @@ const blog = defineCollection({
tags: z.array(z.string()),
}),
});
const albums = defineCollection({
type: "data",
schema: ({ image }) =>
z.object({
title: z.string(),
description: z.string().optional(),
cover: image(),
}),
});
// Export a single `collections` object to register your collection(s)
export const collections = { blog };
export const collections = { blog, albums };