Adds the blog system ahead of the launch post: a zod-typed `blog` content collection (content layer glob loader), a card-list index with a calm empty state, the post route/layout with reading time, and an RSS feed — all wired to the existing Base shell and palette. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
19 lines
568 B
TypeScript
19 lines
568 B
TypeScript
import { defineCollection, z } from 'astro:content';
|
|
import { glob } from 'astro/loaders';
|
|
|
|
const blog = defineCollection({
|
|
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/content/blog' }),
|
|
schema: z.object({
|
|
title: z.string(),
|
|
description: z.string(),
|
|
pubDate: z.coerce.date(),
|
|
updatedDate: z.coerce.date().optional(),
|
|
author: z.string().default('Diego Reséndez'),
|
|
tags: z.array(z.string()).optional(),
|
|
draft: z.boolean().default(false),
|
|
heroImage: z.string().optional(),
|
|
}),
|
|
});
|
|
|
|
export const collections = { blog };
|