Migrate to astro v2

This commit is contained in:
prototypa
2023-01-21 18:19:18 -05:00
parent b575a89329
commit 09e827c035
9 changed files with 28 additions and 29 deletions

View File

@ -1,7 +1,7 @@
import { z, defineCollection } from 'astro:content';
const blog = defineCollection({
schema: {
schema: z.object({
title: z.string(),
description: z.string().optional(),
image: z.string().optional(),
@ -16,7 +16,7 @@ const blog = defineCollection({
category: z.string().optional(),
tags: z.array(z.string()).optional(),
author: z.string().optional(),
},
}),
slug: ({ defaultSlug, data }) => {
return data.permalink || defaultSlug;
},