Restructure blogs as Astro monorepo
Some checks are pending
Build / build (push) Waiting to run

This commit is contained in:
Neeldhara Misra 2026-06-13 21:15:16 +02:00
parent fb5a3b8093
commit 58d8b661a8
1055 changed files with 116254 additions and 89 deletions

View file

@ -0,0 +1,63 @@
import { glob } from "astro/loaders";
import { defineCollection, z } from "astro:content";
const blogSchema = z.object({
title: z.string(),
description: z.string(),
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
image: z.string().optional(),
authorImage: z.string().optional(),
authorName: z.string().optional(),
});
const research = defineCollection({
loader: glob({
base: "./src/content/research",
pattern: "**/*.{md,mdx}",
}),
schema: blogSchema,
});
const puzzles = defineCollection({
loader: glob({
base: "./src/content/puzzles",
pattern: "**/*.{md,mdx}",
}),
schema: blogSchema,
});
const reviews = defineCollection({
loader: glob({ base: "./src/content/reviews", pattern: "**/*.{md,mdx}" }),
schema: blogSchema,
});
const reflections = defineCollection({
loader: glob({ base: "./src/content/reflections", pattern: "**/*.{md,mdx}" }),
schema: blogSchema,
});
const vibes = defineCollection({
loader: glob({ base: "./src/content/vibes", pattern: "**/*.{md,mdx}" }),
schema: blogSchema,
});
const art = defineCollection({
loader: glob({ base: "./src/content/art", pattern: "**/*.{md,mdx}" }),
schema: blogSchema,
});
const poetry = defineCollection({
loader: glob({ base: "./src/content/poetry", pattern: "**/*.{md,mdx}" }),
schema: blogSchema,
});
export const collections = {
research,
vibes,
puzzles,
reflections,
poetry,
reviews,
art,
};