This commit is contained in:
Barrett Ruth 2025-10-08 19:04:25 -04:00
parent 846bce9480
commit 60aea94006
32 changed files with 328 additions and 278 deletions

View file

@ -1,36 +1,17 @@
import { defineCollection, z } from "astro:content";
const postsCollection = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string().optional(),
date: z.string().optional(),
useKatex: z.boolean().optional().default(false),
useD3: z.boolean().optional().default(false),
scripts: z.array(z.string()).optional(),
}),
});
const gistsCollection = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string().optional(),
date: z.string().optional(),
}),
});
const gitsCollection = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
date: z.string().optional(),
}),
const base = z.object({
title: z.string(),
description: z.string().optional(),
date: z.string().optional(),
});
export const collections = {
posts: postsCollection,
gists: gistsCollection,
git: gitsCollection,
algorithms: defineCollection({ type: "content", schema: base }),
software: defineCollection({ type: "content", schema: base }),
meditations: defineCollection({ type: "content", schema: base }),
"autonomous-racing": defineCollection({ type: "content", schema: base }),
git: defineCollection({ type: "content", schema: base }),
gists: defineCollection({ type: "content", schema: base }),
};