Start implementation for blog posts
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// 1. Import utilities from `astro:content`
|
||||
import { defineCollection, z } from 'astro:content';
|
||||
|
||||
// 2. Import loader(s)
|
||||
import { glob, file } from 'astro/loaders';
|
||||
|
||||
// 3. Define your collection(s)
|
||||
const blog = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/data/blog" }),
|
||||
});
|
||||
|
||||
// 4. Export a single `collections` object to register your collection(s)
|
||||
export const collections = { blog };
|
||||
Reference in New Issue
Block a user