From fa4671ca283266092cf4f52357836d2f57817089 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Sat, 7 Sep 2024 16:14:22 -0300 Subject: [PATCH] [error docs] Update error messages that reference src/content/ (#11943) --- .changeset/sharp-worms-sniff.md | 5 +++++ packages/astro/src/core/errors/errors-data.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/sharp-worms-sniff.md diff --git a/.changeset/sharp-worms-sniff.md b/.changeset/sharp-worms-sniff.md new file mode 100644 index 000000000000..4cd7050b992b --- /dev/null +++ b/.changeset/sharp-worms-sniff.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Updates error messages that assume content collections are located in `src/content/` with more generic language diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts index 8e189bfe462a..8c972a5fd81a 100644 --- a/packages/astro/src/core/errors/errors-data.ts +++ b/packages/astro/src/core/errors/errors-data.ts @@ -1431,7 +1431,7 @@ export const GetEntryDeprecationError = { * "title" is required.
* "date" must be a valid date. * @description - * A Markdown or MDX entry in `src/content/` does not match its collection schema. + * A Markdown or MDX entry does not match its collection schema. * Make sure that all required fields are present, and that all fields are of the correct type. * You can check against the collection schema in your `src/content/config.*` file. * See the [Content collections documentation](https://docs.astro.build/en/guides/content-collections/) for more information. @@ -1455,7 +1455,7 @@ export const InvalidContentEntryFrontmatterError = { * @see * - [The reserved entry `slug` field](https://docs.astro.build/en/guides/content-collections/) * @description - * An entry in `src/content/` has an invalid `slug`. This field is reserved for generating entry slugs, and must be a string when present. + * A collection entry has an invalid `slug`. This field is reserved for generating entry slugs, and must be a string when present. */ export const InvalidContentEntrySlugError = { name: 'InvalidContentEntrySlugError',