octopress / multilingual

Write elegant multi-language Jekyll sites
MIT License
69 stars 15 forks source link

adding multilingual processing for Pages; mimicking process used for … #20

Open uaqben opened 9 years ago

uaqben commented 9 years ago

Hi @imathis

This is my first pull request - I hope it's ok :sweat_smile:

I looked into the gem's code to see if I could solve my problem #19 "upstream".

Basically I duplicated parts of the processing I saw you were doing for Posts, and set these to focus on Pages.

The result is that it solves my issue #19

I can use the super-clean markup for my navigation bar in the _includes/header, (ie. just using the default[1]), and now compiling the site jekyll will correctly only pull/include the pages which are of the same language.

If you can include and/or improve this multilingual processing for Pages it would be really cool. Thanks!

[1] {% for page in site.pages %} {% if page.title %} ... {% endif %} {% endfor %}