You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support new location for content config (#12475)
* feat: support new location for content config
* Test fixes
* Handle missing dir
* Handle missing content dir
* chore: changes from review
* Revert legacy fixtures
* Clarify changeset
'Collections that use the Content Layer API must have a `loader` defined and no `type` set.',
34
-
"Check your collection definitions in `src/content/config.*`.'",
44
+
`Collections that use the Content Layer API must have a \`loader\` defined and no \`type\` set. Check your collection definitions in ${getImporterFilename()??'your content config file'}.`,
`\`astro sync\` command failed to generate content collection types: ${errorMessage}`,
1449
-
hint: 'This error is often caused by a syntax error inside your content, or your content configuration file. Check your `src/content/config.*` file for typos.',
1449
+
hint: (fileName?: string)=>
1450
+
`This error is often caused by a syntax error inside your content, or your content configuration file. Check your ${fileName??'content config'} file for typos.`,
* When you are ready to remove this flag and migrate to the new Content Layer API for your legacy collections, you must define a collection for any directories in `src/content/` that you want to continue to use as a collection. It is sufficient to declare an empty collection, and Astro will implicitly generate an appropriate definition for your legacy collections:
1708
1708
*
1709
1709
* ```js
1710
-
* // src/content/config.ts
1710
+
* // src/content.config.ts
1711
1711
* import { defineCollection, z } from 'astro:content';
0 commit comments