mirror of
https://github.com/anotherhadi/blog.git
synced 2026-05-20 13:32:33 +02:00
Update projects structure
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
import { defineCollection, z } from "astro:content";
|
||||
import { glob } from "astro/loaders";
|
||||
|
||||
const projects = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/content/projects" }),
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
image: image(),
|
||||
tags: z.array(z.string()),
|
||||
demoLink: z.string().url().optional(),
|
||||
url: z.string().url().optional(),
|
||||
sourceLink: z.string().url().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
const blog = defineCollection({
|
||||
loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/blog" }),
|
||||
schema: ({ image }) =>
|
||||
@@ -29,6 +15,5 @@ const blog = defineCollection({
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
projects,
|
||||
blog,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user