This utility aims to provide a solution to some ploblems when using Polyglot to make multi-language Jekyll websites:
You can check the simple demo page rendered with Liquid to grt the map/index generated, and the source of the page.
_data
folder, so you access them with Liquid.ruby _utils/polyglot-indexing.rb
could be added to Travis scripts._config.yml
to automatically know your languages
and the default_lang
.--lang_from_path
: to have exact same behaviour with Polyglot's lang_from_path
.lang_from_path
version. Optional.Actually only the script is needed here, the batch files are just provided for convenience.
:warning:The script is designed to be run from the root path of your Jekyll site (where _data, _post resides), that's why the batch file calls ./_utils/polyglot-indexing.rb
. Running from elsewhere is not tested.
I was just started to build my blogs, trying to make it multilingual and encountered the problems myself and saw others need this too, so I made this.
The tool is made within 1 day, and I was totally new to Jekyll, Travis & Ruby, so maybe there are bugs in there, I don't know :smile:
If you encountered any behaviour inconsistent with what described here, please let me know by creating a issue.
I have no plan to make it more convienient like add some external file to config the behaviour, it is designed to be altered by editing the script.
If you are interested to make it better or share new cool feature you make, feel free to send a PR!
Copyright (c) Ren Chen 2020. License: MIT