content.config.ts (470B)
1 import { defineCollection } from 'astro:content' 2 import { glob, file } from 'astro/loaders' 3 4 const blog = defineCollection({ 5 loader: glob({ 6 base: './src/content/blog', 7 pattern: '**/*.md', 8 }), 9 }) 10 11 const photos = defineCollection({ 12 loader: file('./src/content/photos/photos.json'), 13 }) 14 15 const repos = defineCollection({ 16 loader: glob({ 17 base: './src/content/repos', 18 pattern: '**/repo.json', 19 }) 20 }) 21 22 export const collections = { blog, photos, repos }