0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Update error message for custom slugs in collection (#7395)

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
Alvin Bryan 2023-06-15 08:40:32 -07:00 committed by GitHub
parent d67ae84610
commit e407073c9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1042,9 +1042,9 @@ See https://docs.astro.build/en/guides/server-side-rendering/ for more informati
/**
* @docs
* @see
* - [The reserved entry `slug` field](https://docs.astro.build/en/guides/content-collections/)
* - [The reserved entry `slug` field](https://docs.astro.build/en/guides/content-collections/#defining-custom-slugs)
* @description
* A content collection schema should not contain the `slug` field. This is reserved by Astro for generating entry slugs. Remove the `slug` field from your schema, or choose a different name.
* 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.
*/
ContentSchemaContainsSlugError: {
title: 'Content Schema should not contain `slug`.',