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 * @docs
* @see * @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 * @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: { ContentSchemaContainsSlugError: {
title: 'Content Schema should not contain `slug`.', title: 'Content Schema should not contain `slug`.',