Add missing node build files
This commit is contained in:
16
src/content/config.ts
Normal file
16
src/content/config.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// 1. Import utilities from `astro:content`
|
||||
import { defineCollection } from 'astro:content';
|
||||
|
||||
// 2. Import loader(s)
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
// 3. Define your collection(s)
|
||||
const projects = defineCollection({
|
||||
loader: glob({ pattern: "*.md", base: "src/content/projects" })
|
||||
})
|
||||
const hobbies = defineCollection({
|
||||
loader: glob({ pattern: "*.md", base: "src/content/hobbies" })
|
||||
})
|
||||
|
||||
// 4. Export a single `collections` object to register your collection(s)
|
||||
export const collections = { projects, hobbies };
|
||||
Reference in New Issue
Block a user