ashmaroli / jekyll-locale

A localization plugin for Jekyll
MIT License
19 stars 5 forks source link

Issues while migrating borisschapira.com #2

Open borisschapira opened 6 years ago

borisschapira commented 6 years ago

I'm trying to migrate borisschapira.com and encounter several issues (branc dev). Right now, the main issue being:

And, last but not least, the build is sloooooow. Like, very. Event with a limit_posts: 1, so the build only concerns my pages and _confs collection, I have to wait ~1m30s for a build. On master, same config, 8-9s. However, the inertia may be related to the previous explained issues: if I manage to solve them, things may go faster…

ashmaroli commented 6 years ago

Thank you for opening this issue, Boris. I shall look into your dev branch and leave feedback in the associate pull request

For pages in _locales to be considered, they should be further nested in a sub-directory named according to the locales.. For example, _locales/en-US/_posts/2015-10-11-some-title.markdown when en-US is not your site's default-locale

Regarding the performance issue, the reason could be due to re-rendering of the pages in the _locales directory

borisschapira commented 6 years ago

My posts and pages are nested into fr, en folders, as defined into my configuration. I've put in _locales every translated page or post.

ashmaroli commented 6 years ago

I've put in _locales every translated page or post.

Agreed. But I think, there is something missing in my README that has not made things clear for you: Let me explain with the post at path https://github.com/borisschapira/borisschapira.com/blob/dev/_locales/en/_posts/dad/2018-01-12-chip-n-dale/2018-01-12-chip-n-dale.md

That is the translated version because your site's default locale is "fr" Okay. For that "path",

              source: https://github.com/borisschapira/borisschapira.com/blob/dev
  base_relative_path: _posts/dad/2018-01-12-chip-n-dale/2018-01-12-chip-n-dale.md
locale_relative_path: _posts/dad/2018-01-12-chip-n-dale/2018-01-12-chip-n-dale.md

https://github.com/borisschapira/borisschapira.com/blob/dev/_posts/dad/2018-01-12-chip-n-dale/2018-01-12-chip-n-dale.md https://github.com/borisschapira/borisschapira.com/blob/dev/_locales/en/_posts/dad/2018-01-12-chip-n-dale/2018-01-12-chip-n-dale.md