Hello! Just now migrating my site to v5 and the only real migration I need to do is a simple (or so I thought) content collection.
I've edited my src/content/config.ts to src/content.config.ts with the following setup:
import { defineCollection, z } from "astro:content";
import { glob } from "astro/loaders";
const knowledgebase = defineCollection({
loader: glob({ pattern: "**/*.mdx", base: "./src/content/knowledgebase" }),
schema: z.object({
title: z.string(),
category: z.string(),
}),
});
export const collections = {
knowledgebase,
};
The content hasn't moved, it's still src/content/knowledgebase but no matter how I adjust the glob I get the following:
The collection "knowledgebase" does not exist or is empty. Ensure a collection directory with this name exists.
Unsure of how to fix this tbh, any help is appreciated!
PS. V5 looks awesome 😄