kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
927 stars 202 forks source link

Generate only select versions of pages. #178

Closed mkrajewski90 closed 4 years ago

mkrajewski90 commented 4 years ago

Related to issue: https://github.com/kurtsson/jekyll-multiple-languages-plugin/issues/177

Possibly to select versions of the pages to render, ex. when languages are ["en", "pl"] and I want to generate only pl version (english is default), I can use:

---
languages: ["pl"]
---

Critical for my site (where different languages require different pages).

Cheers!

shushugah commented 4 years ago

Thank you Michał! This PR looks good! I confirmed it by adding this to my Gemfile locally and confirmed it works for both excluding the default language, and also exclusively only using the default language (e.g allow only example.com to work, and exclude example.com/pl.

This solves the case, where a translated page relies on translation keys, and it's a weird experience if 5 of the translated pages all rely on the fallback language keys.

gem 'jekyll-multiple-languages-plugin',
    github: 'kurtsson/jekyll-multiple-languages-plugin', ref: 'refs/pull/178/head'
shushugah commented 4 years ago

Please rebase off of master, so that the TravisCI builds will work

mkrajewski90 commented 4 years ago

Thank you @shushugah for approving. I've rebased master and now tests passed.