Open borisschapira opened 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
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
.
I've put in
_locales
every translatedpage
orpost
.
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
fr
locales. They're your original source files.
Only _locales/en
directory needs to contain copies.base_relative_path
and locale_relative_path
(example only) should exist on the file system.
i.e. the following "GitHub urls" should be validhttps://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
I'm trying to migrate borisschapira.com and encounter several issues (branc dev). Right now, the main issue being:
_locales
seems to be considered during the build. Should I explicit_locales
ininclude:
in my_config.yml
?_locales
are built. I have access to{{ locale | inspect }}
with the good values, but{{ page.locale | inspect }}
echoesnil
.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. Onmaster
, 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…