untra / polyglot

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

jekyll-polyglot removes any images generated by jekyll_picture_tag #152

Open kylekirkby opened 2 years ago

kylekirkby commented 2 years ago

Hi @untra ,

We're using the jekyll_picture_tag plugin to generate webp images for our sites. With the addition of jekyll-polyglot this has broken. Jekyll_picture_tag places the generated images inside the assets/images of the output site folder as the site is building. When the site build ends, it appears that jekyll-polylgot is removing all of these generated images and simply replacing the folder assets/images folder that exists in the base of the repo.

Any ideas how we can stop this happening?

As a work-around I've had to set the output folder for generated images to a folder at the root of the repo (outside of the build folder). This then gets copied in as expected.

# -------- jekyll_picture_tag --------
picture:
  nomarkdown: false
  suppress_warnings: true
  source: ""
  output: "../generated"
  relative_url: true
  disabled: false

# Jekyll-polyglot
i18n_enabled: true
languages: ["en", "ja"]
default_lang: "en"
exclude_from_localization:
  ["javascript", "images", "css", "public", "assets", "generated"]
parallel_localization: false
kylekirkby commented 2 years ago

Possibly an issue with this file? https://github.com/untra/polyglot/blob/master/lib/jekyll/polyglot/patches/jekyll/static_file.rb

timbms commented 2 days ago

Is there an update to this issue?