feat: move articles link from 'blog/' to 'post/' paths

This commit is contained in:
grassblock 2025-05-04 11:42:09 +08:00
parent 350f6f3865
commit 7e5f8ce06f
9 changed files with 15 additions and 9 deletions

View file

@ -1,11 +1,17 @@
import { defineCollection } from 'astro:content';
import { blogs } from './blog/_schemas';
import { posts } from './posts/_schemas';
import { pages } from "./pages/_schemas";
const blogCollection = defineCollection({
type: 'content',
schema: blogs,
schema: posts,
});
const pageCollection = defineCollection({
type: 'content',
schema: pages,
});
export const collections = {
'blog': blogCollection,
'posts': blogCollection,
'pages': pageCollection,
};

View file

@ -1,6 +1,6 @@
import { z } from 'astro:content';
export const blogs = z.object({
export const posts = z.object({
title: z.string(),
description: z.string(),
pubDate: z.coerce.date(),