mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-06-02 00:33:14 +00:00
Post, Project and index pages
Example posts
This commit is contained in:
parent
5970f11bcc
commit
d3dafddf74
21 changed files with 625 additions and 168 deletions
28
src/content/content.ts
Normal file
28
src/content/content.ts
Normal 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,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue