adamduncan / eleventy-plugin-i18n

Eleventy plugin to assist with internationalization and dictionary translations
MIT License
103 stars 10 forks source link

Identifying locale from URL fails when permalink is set to `false` #10

Closed arkhi closed 3 years ago

arkhi commented 3 years ago

I was originally going to submit a PR, but since there are already 3 waiting, I decided to first open this issue.

Eleventy allows to specify permalink: false to not generate a page for specific templates.

This results in the error TypeError: url.split is not a function because false.split is problematic.

I think #5 actually solves this issue.

arkhi commented 3 years ago

:innocent: Duplicate of #4.

adamduncan commented 3 years ago

Thanks @arkhi. There's a bit of extra functionality covered in #4 that we're not quite 100% on.

I think likely we'll get in a dedicated permalink: false fix as a patch release. Thanks for reminding me.