Some changes

This commit is contained in:
Anton Pogrebnjak
2025-09-09 20:57:22 +02:00
parent 4fcf4bd2e8
commit 5bd3063d5f
10 changed files with 3137 additions and 1604 deletions

View File

@@ -2,31 +2,33 @@ import { glob } from 'astro/loaders';
import { defineCollection, z } from 'astro:content';
const blog = defineCollection({
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: './src/content/blog', pattern: '**/*.{md,mdx}' }),
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
description: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
}),
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: './src/content/blog', pattern: '**/*.{md,mdx}' }),
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
description: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
}),
});
const projects = defineCollection({
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: './src/content/projects', pattern: '**/*.{md,mdx}' }),
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
description: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
}),
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({
base: './src/content/projects', pattern: '**/*.{md,mdx}'
}),
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
description: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
}),
});
export const collections = { blog, projects };

View File

@@ -17,15 +17,15 @@ import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
<h1>Anton Pogrebnjak</h1>
<div style="max-width: 40rem">
<p>
Really, I don't have much to tell you about myself. Just look at the amazing stuff I've done and written about. That should suffice.
</p>
Really, I don't have much to tell you about myself. Just look at the amazing stuff I've done and written about. That should suffice.
</p>
<p style="float: right; text-align: end;">Kind regards,<br>Anton</p>
</div>
</div>
</Main>
<Footer />
</body>
<style>
</style>
</style>
</html>