feat(all): first init
This commit is contained in:
commit
67c6e47f58
34 changed files with 2155 additions and 0 deletions
14
src/content.config.ts
Normal file
14
src/content.config.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { defineCollection, z } from "astro:content";
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
const blog = defineCollection({
|
||||
loader: glob({ pattern: '**/*.{md,mdx}', base: "./src/content" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
date: z.coerce.date(),
|
||||
draft: z.boolean().optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = { blog };
|
Loading…
Add table
Add a link
Reference in a new issue