fix: navbar path error

This commit is contained in:
radishzzz 2025-03-12 03:41:07 +00:00
parent a2bf9ee3c5
commit a133dfd7f2
3 changed files with 28 additions and 17 deletions

View file

@ -2,11 +2,13 @@ import { defineCollection, z } from 'astro:content'
const postsCollection = defineCollection({
schema: z.object({
// Basic
title: z.string(),
published: z.date(),
updated: z.date().optional(),
tags: z.array(z.string()).optional().default([]),
// Advanced
pin: z.number().int().min(0).max(99).optional().default(0),
draft: z.boolean().optional().default(false),
@ -16,6 +18,7 @@ const postsCollection = defineCollection({
abbrlink => !abbrlink || /^[a-z0-9\-]*$/.test(abbrlink),
{ message: 'Abbrlink can only contain lowercase letters, numbers and hyphens' },
),
// Auto-generated
description: z.string().optional().default(''),
image: z.string().optional().default(''),