eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

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

Open Jay-Salisbury opened this issue 1 year ago • 0 comments

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

Jay-Salisbury avatar Feb 20 '24 01:02 Jay-Salisbury