This commit is contained in:
parent
fb5a3b8093
commit
58d8b661a8
1055 changed files with 116254 additions and 89 deletions
63
sites/reflections/src/content/config.ts
Normal file
63
sites/reflections/src/content/config.ts
Normal 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,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue