-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Raise error for duplicate content entry slugs #7352
Conversation
🦋 Changeset detectedLatest commit: bb38e8e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hey @eybarta! That second error is interesting. I wonder if that error is coming from our router rather than content collections. Are you using the dynamic pattern |
Yep, I was using [slug].astro, will try to change [...slug].astro Thanks for your help 🙏 |
Sorry I'm still having some issues, everything seems to work fine but in my [...slug].astro file But this populates 'pages' with blog posts from all languages. My file structure is: I tried filtering the pages to include only posts from the current language, but I don't have access to Astro.url Appreciate your help on this :) |
@eybarta |
Sweet! thank you, didn't know I can do that. |
Changes
slug
frontmatter property. This silently maps multiple entries to the same identifier, breakinggetEntryBySlug()
and our internal rendering logic.Testing
Manually test that error is readable
Docs
New AstroErrorsData entry