Skip to content
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

getNextCollectionItem not working where there are multiple languages and fileslug is the same in each language #3207

Open
Jay-Salisbury opened this issue Feb 20, 2024 · 0 comments

Comments

@Jay-Salisbury
Copy link

Operating system

macOS Sonoma

Eleventy

2.0.1

Describe the bug

getNextCollectionItem and getPreviousCollectionItem error in multi-language sites with matching fileslugs

Reproduction steps

I have a file structure where there are posts as such:

/en/posts/2024/2024-02-02-filename.md
/es/posts/2024/2024-02-02-filename.md

In this situation getNextCollectionItem and getPreviousCollectionItem do not consistently generate links- there is no object returned to the template. If I change the filename of the markdown file then the links are correctly generated. I have created a custom filter to get around the problem so no immediate need, just wanted to contribute. Thanks!

Expected behavior

No response

Reproduction URL

No response

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant