This commit is contained in:
parent
56f49d988d
commit
80c51bdfea
75 changed files with 383 additions and 1838 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { glob } from 'astro/loaders';
|
||||
import { defineCollection, z } from 'astro:content';
|
||||
import { glob } from "astro/loaders";
|
||||
import { defineCollection, z } from "astro:content";
|
||||
|
||||
const blogSchema = z.object({
|
||||
title: z.string(),
|
||||
|
|
@ -11,28 +11,19 @@ const blogSchema = z.object({
|
|||
authorName: z.string().optional(),
|
||||
});
|
||||
|
||||
const blog = defineCollection({
|
||||
loader: glob({ base: "./src/content/blog", pattern: "**/*.{md,mdx}" }),
|
||||
schema: blogSchema,
|
||||
});
|
||||
|
||||
const bfs = defineCollection({
|
||||
loader: glob({ base: "./src/content/bfs", pattern: "**/*.{md,mdx}" }),
|
||||
schema: blogSchema,
|
||||
});
|
||||
|
||||
const dfs = defineCollection({
|
||||
loader: glob({ base: "./src/content/dfs", pattern: "**/*.{md,mdx}" }),
|
||||
schema: blogSchema,
|
||||
});
|
||||
|
||||
const problems = defineCollection({
|
||||
loader: glob({ base: "./src/content/problems", pattern: "**/*.{md,mdx}" }),
|
||||
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}" }),
|
||||
loader: glob({
|
||||
base: "./src/content/puzzles",
|
||||
pattern: "**/*.{md,mdx}",
|
||||
}),
|
||||
schema: blogSchema,
|
||||
});
|
||||
|
||||
|
|
@ -51,21 +42,6 @@ const vibes = defineCollection({
|
|||
schema: blogSchema,
|
||||
});
|
||||
|
||||
const workflows = defineCollection({
|
||||
loader: glob({ base: "./src/content/workflows", pattern: "**/*.{md,mdx}" }),
|
||||
schema: blogSchema,
|
||||
});
|
||||
|
||||
const magic = defineCollection({
|
||||
loader: glob({ base: "./src/content/magic", pattern: "**/*.{md,mdx}" }),
|
||||
schema: blogSchema,
|
||||
});
|
||||
|
||||
const contests = defineCollection({
|
||||
loader: glob({ base: "./src/content/contests", pattern: "**/*.{md,mdx}" }),
|
||||
schema: blogSchema,
|
||||
});
|
||||
|
||||
const art = defineCollection({
|
||||
loader: glob({ base: "./src/content/art", pattern: "**/*.{md,mdx}" }),
|
||||
schema: blogSchema,
|
||||
|
|
@ -77,17 +53,11 @@ const poetry = defineCollection({
|
|||
});
|
||||
|
||||
export const collections = {
|
||||
blog,
|
||||
bfs,
|
||||
dfs,
|
||||
problems,
|
||||
puzzles,
|
||||
reviews,
|
||||
reflections,
|
||||
research,
|
||||
vibes,
|
||||
workflows,
|
||||
magic,
|
||||
contests,
|
||||
art,
|
||||
puzzles,
|
||||
reflections,
|
||||
poetry,
|
||||
reviews,
|
||||
art,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue