Add blog app scaffolding with remark plugins
This commit is contained in:
parent
9d9f213bbe
commit
0b8b50cf12
5 changed files with 84 additions and 0 deletions
13
apps/blog/src/content.config.ts
Normal file
13
apps/blog/src/content.config.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { defineCollection } from 'astro:content';
|
||||
import { glob } from 'astro/loaders';
|
||||
import { z } from 'astro/zod';
|
||||
|
||||
const posts = defineCollection({
|
||||
loader: glob({ pattern: '**/*.md', base: './src/content/posts' }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
date: z.coerce.date()
|
||||
})
|
||||
});
|
||||
|
||||
export const collections = { posts };
|
||||
Loading…
Add table
Add a link
Reference in a new issue