-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
support for legacy content collections removed #12376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sarah11918
wants to merge
13
commits into
v6
Choose a base branch
from
content-collections-removed
base: v6
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3d722b8
removed content collections
sarah11918 07221b6
Merge branch 'v6' into content-collections-removed
sarah11918 ea94f56
links back to v5 content
sarah11918 2471a2b
proper link syntax
sarah11918 9ff6f61
Merge branch 'v6' into content-collections-removed
sarah11918 fddbb86
remove legacy flag documentation
sarah11918 fb4c121
🌭 details? do we like this?
sarah11918 29fb6aa
add the implementation PR and some stronger wording
sarah11918 41f864b
add removing legacy flag
sarah11918 1a71b64
don't focus on collection API names, just legacy/new
sarah11918 e849055
add placeholder error messages
sarah11918 171c416
relative links
sarah11918 5adf67e
links to Content Layer API deep dive blog post and content collection…
sarah11918 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/content/docs/en/reference/errors/content-collection-invalid-type.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs' | ||
# Do not make edits to it directly, they will be overwritten. | ||
# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
# Translators, please remove this note and the <DontEditWarning/> component. | ||
|
||
title: Content collection invalid type. | ||
i18nReady: true | ||
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
--- | ||
|
||
import DontEditWarning from '~/components/DontEditWarning.astro' | ||
|
||
<DontEditWarning /> | ||
|
||
|
||
> Invalid collection type "data". Remove the type from your collection definition in your content config file. | ||
|
||
### What went wrong? | ||
|
||
Content collections should no longer have a type field. Remove this field from your content config file. | ||
|
||
See the [Astro 6 migration guide](/en/guides/upgrade-to/v6/#removed-legacy-content-collections) for more information. |
25 changes: 25 additions & 0 deletions
25
src/content/docs/en/reference/errors/content-collection-missing-loader.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs' | ||
# Do not make edits to it directly, they will be overwritten. | ||
# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
# Translators, please remove this note and the <DontEditWarning/> component. | ||
|
||
title: Content collection missing loader. | ||
i18nReady: true | ||
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
--- | ||
|
||
import DontEditWarning from '~/components/DontEditWarning.astro' | ||
|
||
<DontEditWarning /> | ||
|
||
|
||
> Collections must have a loader defined. Check your collection definitions in your content config file. | ||
|
||
### What went wrong? | ||
|
||
A legacy content config file was found. Move the file to `src/content.config.ts` and update any collection definitions if needed. | ||
A content collection is missing a loader definition. Make sure that each collection in your content config file has a loader. | ||
|
||
**See Also:** | ||
- [Content collections configuration](/en/guides/content-collections/#defining-the-collection-loader) |
26 changes: 26 additions & 0 deletions
26
src/content/docs/en/reference/errors/legacy-content-config-error.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs' | ||
# Do not make edits to it directly, they will be overwritten. | ||
# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
# Translators, please remove this note and the <DontEditWarning/> component. | ||
|
||
title: Legacy content config error. | ||
i18nReady: true | ||
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
--- | ||
|
||
import DontEditWarning from '~/components/DontEditWarning.astro' | ||
|
||
<DontEditWarning /> | ||
|
||
|
||
> Legacy content config file found. | ||
|
||
### What went wrong? | ||
|
||
A legacy content config file was found. Move the file to `src/content.config.ts` and update any collection definitions if needed. | ||
|
||
See the [Astro 6 migration guide](/en/guides/upgrade-to/v6/#removed-legacy-content-collections) for more information. | ||
|
||
**See Also:** | ||
- [Content collections configuration](/en/guides/content-collections/#the-collection-config-file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.