Skip to content

内容架构不应包含 slug。

ContentSchemaContainsSlugError:内容集合架构不应包含 slug,因为它是为 slug 生成而保留的。将其从你的 COLLECTION_NAME 集合架构中删除。

¥ContentSchemaContainsSlugError: A content collection schema should not contain slug since it is reserved for slug generation. Remove this from your COLLECTION_NAME collection schema.

¥What went wrong?

内容集合架构不应包含 slug 字段。这是 Astro 保留的用于生成入口段。从你的架构中删除 slug。你仍然可以在 frontmatter 中使用自定义 slugs。

¥A content collection schema should not contain the slug field. This is reserved by Astro for generating entry slugs. Remove slug from your schema. You can still use custom slugs in your frontmatter.

也可以看看:

¥See Also:

Astro 中文网 - 粤ICP备13048890号