patch(): fix the nits

This commit is contained in:
2026-03-04 17:46:10 +01:00
parent e16c84e879
commit abb6bc52ce
30 changed files with 1129 additions and 249 deletions

View File

@@ -1,35 +1,40 @@
import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';
import { defineCollection, z } from "astro:content";
import { glob } from "astro/loaders";
const personal = defineCollection({
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: './src/content/blog/personal', 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(),
}),
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({
base: "./src/content/blog/personal",
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(),
}),
});
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(),
}),
// 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 };