reorderd stuff, added homepage

This commit is contained in:
2026-03-02 20:55:04 +01:00
parent 245508f81a
commit 67bbc3cf9a
32 changed files with 480 additions and 379 deletions

View File

@@ -1,9 +1,9 @@
import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';
const blog = defineCollection({
const personal = defineCollection({
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: './src/content/blog', pattern: '**/*.{md,mdx}' }),
loader: glob({ base: './src/content/blog/personal', pattern: '**/*.{md,mdx}' }),
// Type-check frontmatter using a schema
schema: ({ image }) =>
z.object({
@@ -16,4 +16,20 @@ const blog = defineCollection({
}),
});
export const collections = { blog };
const uni = defineCollection({
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: './src/content/blog/university', pattern: '**/*.{md,mdx}' }),
// Type-check frontmatter using a schema
schema: ({ image }) =>
z.object({
title: z.string(),
description: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
gitLink: z.string().optional(),
heroImage: image().optional(),
}),
});
export const collections = { personal, uni };