feat: drafts frontmatter & exclude drafts from production
This commit is contained in:
parent
bfd3bef223
commit
ca28bd2d36
12 changed files with 34 additions and 11 deletions
|
@ -4,6 +4,7 @@ import { z, reference } from 'astro:content';
|
|||
export const posts = ({ image }) => z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
draft: z.boolean().optional().default(false),
|
||||
summary: z.string().optional(),
|
||||
date: z.coerce.date(),
|
||||
categories: z.union([z.array(z.string()), z.string()]).transform(val => Array.isArray(val) ? val : [val]).default(['uncategorized']),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue