kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
922 stars 203 forks source link

{{ site.baseurl }} and {{ site.baseurl_root }} don't seem to work when included #166

Open erciccione opened 4 years ago

erciccione commented 4 years ago

I tried to use {{ site.baseurl_root }} in a file in _include/file.html. This file gets included in a layout, which will be used by the final page.

Looks like {{ site.baseurl_root }} and {{ site.baseurl }} don't get recognized as a valid instruction if added in a layout or in a file inside _includes, which results in the final page not showing the baseurl. Is this an expected behaviour or i'm missing something?

mondeja commented 3 years ago

I've found the same problem, and not sure if it is the expected behaviour, but it would be awesome if this could be fixed or clarified. For now, I'm executing my own exclude_from_localizations function after the build process to ensure that my folder assets/css is removed. You can see the patch as a Rake task here.

volkerholloh commented 2 years ago

+1 I am facing this in "includes footer", which keeps me from using "translate link" to localized files.

george-gca commented 1 year ago

I just found out when this happens (at least for me). See #119.

montahaee commented 6 months ago

I tried to use {{ site.baseurl_root }} in a file in _include/file.html. This file gets included in a layout, which will be used by the final page.

Looks like {{ site.baseurl_root }} and {{ site.baseurl }} don't get recognized as a valid instruction if added in a layout or in a file inside _includes, which results in the final page not showing the baseurl. Is this an expected behaviour or i'm missing something?

Hey, I faced the same problem, and in my case, the baseurl was not correctly set. After setting it to an empty string (e.g., baseurl: ""), everything works very well.