mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 03:56:19 +02:00
fix: navbar path error
This commit is contained in:
parent
a2bf9ee3c5
commit
a133dfd7f2
3 changed files with 28 additions and 17 deletions
|
@ -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(''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue