This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { glob } from 'astro/loaders';
|
||||
import { z } from 'astro/zod';
|
||||
|
||||
const projects = defineCollection({
|
||||
loader: glob({ pattern: '**/*.md', base: './src/content/projects' }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
summary: z.string(),
|
||||
domain: z.enum(['hardware', 'rf', 'silicon', 'systems']),
|
||||
domainLabel: z.string(), // e.g. "HARDWARE · PCB"
|
||||
when: z.string(), // e.g. "NOV 24 – FEB 25"
|
||||
whenLabel: z.enum(['WHEN', 'STATUS']).default('WHEN'),
|
||||
order: z.number(),
|
||||
tech: z.array(z.string()).default([]),
|
||||
links: z.array(z.object({ label: z.string(), href: z.string().url() })).default([]),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { projects };
|
||||
Reference in New Issue
Block a user