Skip to content

"No Astro Content Collections found" on existing project #932

Closed
@FantixX

Description

@FantixX

So I don't know if it is the same reason, but the issue happened to me on latest Frontmatter and Astro. I however do not get errors in the frontmatter output. Also happens on both npm and pnpm.

Image

My content.config.ts

import { defineCollection, z } from 'astro:content';

import { glob } from 'astro/loaders';

const blog = defineCollection({ 
    loader: glob({ pattern: '**/*.md', base: "./src/content/blog" }),
    schema:({ image }) => z.object({
        title: z.string(),
        description: z.string(),
        createdAt: z.string(),
        updatedAt: z.string(),
        tags: z.array(z.string()),
        image: image(),
        author: z.string().optional(),
        
    }),
});

export const collections = {
    blog,
};

Originally posted by @FantixX in #703

Metadata

Metadata

Assignees

Labels

In BETAThe current task is available for testing in the BETA version.ReleasedThe task has been releasedv10.9.0

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions