Astro Glob Loader Config Generator
Generated configuration:
import { glob } from 'astro/loaders';import { defineCollection } from 'astro:content';
const items = defineCollection({ loader: glob({ pattern: '**/[^_]*.md', base: 'src/data/items', }),});
export const collections = { items };
Additional resources:
- Astro Docs to learn more about
the
glob()
loader. - Glob Tool to quickly and easily test globs against sets of test strings.