Closed kleuter closed 8 years ago
Hi @kleuter,
I never used the site.static_files
and so I did a test and it does seems that when using the exclude_from_localizations
, the site.static_files
data is only available on the main website language and appears empty when accessed on a translated website.
Is this the problem you have?
Hi, Anthony
My images folder is a part of the website and all image files appear in site.static_files
. More info
When I use exclude_from_localizations
to avoid copying of all my images for every language, site.static_files
no longer contains them.
@kleuter, so this seems to be precisely what I found too, the site.static_files
is empty for every sublaguange but is filled for the main language.
I will try to find out what is causing this.
@kleuter, version 1.5.1 has been released containing the fix for this issue.
Please check if it solves your problem so that I can close the issue.
Anthony-Gaudino, I confirm it works now, thanks a lot!
Though, another issue appeared: I exclude folder "assets" but some files are still copied to translation folders. Specifically these 2: assets/css/all.scss (copied as _site/ru/assets/css/all.css) and assets/js/all.js (copied as _site/ru/assets/js/all.js)
_config.yml:
# jekyll-multiple-languages-plugin configuration
languages: ["en", "ru"]
exclude_from_localizations: ["favicon.ico", "assets"]
@kleuter, please try deleting your _site
directory and rebuilding the website.
On my tests it works well, if the files still appear after deleting the _site
and rebuilding, then I would like to see your site, if there's sensitive data, you can try recreating a minimal site that has the error, then just zip it and attach to this issue.
@Anthony-Gaudino, here's reproducible minimal site, just run jekyll build on it https://www.dropbox.com/s/p7vq7n03ppzaj6s/multiple-languages_issue_minimal.zip?dl=0
Thanks!
@kleuter, thank you.
The problem occurs because those two files have a front matter and are not treated as static files by Jekyll, but as pages instead.
I will try to think the best way to deal with this.
Thank you, Anthony. Currently it's a not a big deal, and it's actually another issue, the current can be closed.
I have run into this too and I think it is a big deal. The exclude_from_localizations
just does not work as one would think.
Could we not also ignore pages (files with front matter) that are listed in the array from being translated?
I would provide a PR to at least allow front-matter to specify: i18n: false
to opt out the file from processing. Any pointers where in the code that should go? @kurtsson
Is that normal? I think no. Specially when your code relies on site.static_files variable (my case)