untra / polyglot

:abc: Multilingual and i18n support tool for Jekyll Blogs
https://polyglot.untra.io
MIT License
410 stars 59 forks source link

exclude_from_localization bug #130

Closed Taknok closed 3 years ago

Taknok commented 3 years ago

The config exclude_from_localization seems to not exclude. Here is a base demo: https://github.com/Taknok/i18n_test

The _config.yml has the exclusion value of assets :

exclude_from_localization: ["assets/"]

Then we can see in _site that the assets folder is also present in the local folder, which should not be the case since we excluded it: Capture

I tried with assets/, assets, "assets" and "assets/". Nothing change the behavior.

untra commented 3 years ago

Hi @Taknok 👋

https://github.com/Taknok/i18n_test/blob/master/Gemfile#L18

that's not my jekyll-polyglot gem; that is a fork fdroid made for their own site: https://gitlab.com/fdroid/jekyll-polyglot

I'm not sure what changes they made to the gem tho :/

Taknok commented 3 years ago

OK, sorry, I tried this to see if it fixed the issue (and it didn't). I have corrected the Gemfile now and the issue is still there. You can reproduce it with a docker-compose up .

untra commented 3 years ago

okay, I had some time to look at this. That assets file is being generated from the minima gem. That gem writes those css and icon files out in the postbuild steps in the build directory if those files don't already exist.

polyglot can't prevent those asset files from being included in each build, as they're being created as part of the jekyll build process of a completely different gem.

hopefully this makes sense?