Files
martials.no/src/content/config.ts
Martin Berg Alstad 54db411930
Some checks failed
Build and deploy website / build (push) Failing after 22s
More style changes, removed test projects, favicon
- Fix missing aria-labels
- Fix breadcrumbs on specific projects
- Removed uses from NavBar
- Center image on project page
- Colour link on project page
- Initial README

Signed-off-by: Martin Berg Alstad <git@martials.no>
2025-02-15 19:29:06 +01:00

32 lines
850 B
TypeScript

import { defineCollection, z } from "astro:content"
import { glob } from "astro/loaders"
const projectCollection = defineCollection({
loader: glob({ pattern: "**\/*.mdx", base: "./src/content/projects" }),
schema: ({ image }) =>
z.object({
title: z.string(),
description: z.string(),
heroImage: image(),
heroImageAlt: z.string(),
tags: z.array(z.string()),
source: z.string().url(),
createdAt: z.string().date(),
updatedAt: z.string().date(),
}),
})
const usesCollection = defineCollection({
loader: glob({ pattern: "**\/*.yaml", base: "./src/content/uses" }),
schema: z.object({
title: z.string(),
accessories: z.optional(z.array(z.string())),
hardware: z.array(z.string()),
}),
})
export const collections = {
projects: projectCollection,
uses: usesCollection,
}