Post, Project and index pages

Example posts
This commit is contained in:
Michał Gdula 2024-05-22 22:05:26 +01:00
parent 5970f11bcc
commit d3dafddf74
21 changed files with 625 additions and 168 deletions

28
src/content/content.ts Normal file
View file

@ -0,0 +1,28 @@
import { z, defineCollection } from 'astro:content';
const postsCollection = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string(),
pubDate: z.date(),
image: z.string().optional(),
tags: z.array(z.string()),
}),
});
const projectsCollection = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string(),
image: z.string().optional(),
tags: z.array(z.string()),
}),
});
export const collections = {
"posts": postsCollection,
"projects": projectsCollection,
};