jekyll-multiple-languages-plugin 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cb958eea58bb3968a1dc9d7a5a0c950e14eac14
4
- data.tar.gz: 819ab03100ef0ef5bc7c2df97673a0b8b5e12ed6
3
+ metadata.gz: 1bef6852a05b7a21c25eba5fa9198e6dc74d5bb9
4
+ data.tar.gz: d0be8a101a3f8389c6f41af664b614d96dfbd47b
5
5
  SHA512:
6
- metadata.gz: 477536b9ebcb976921943ea57afc8a14e3c058d9409cac311fd79de0134f728a8b594195ece368650d5683236e70440b5ed9a7f88c95187ea1f971f6ee7cd1d4
7
- data.tar.gz: d35d5501362d2441e1fcd3a84d43c3cc92024ae69e35ca28d26c188c00ac23d114b739237c0e2cc1a8dadc0ec22a8692025036243ac28bb86181ef1fd6a85c5f
6
+ metadata.gz: 8ed37876af2891151477fcda788e7217e6a4b30311f3d31fffd0a56987a53e5230df9167159c9600f9b28b486640cee8cc3a1bb47cb84a2af10e8760454c0b57
7
+ data.tar.gz: 6cc97f0ae0d71ebc17fa61158acc3175d5a0e330c03d15386f3d97701aa9fd2973625fe8ada3581371482d4450921f531b0db38fb65c62f78cc03044f18ccb9c
data/README.md CHANGED
@@ -60,6 +60,8 @@ Copy or link the file `lib/jekyll/multiple/languages/plugin.rb` into your `_plug
60
60
  * Supports translated template files
61
61
 
62
62
  ##Changelog
63
+ * 1.2.8
64
+ * Support for excluding files from translation, thanks to [@h6](https://github.com/H6)
63
65
  * 1.2.7
64
66
  * Support for Jekyll 2.5+, thanks to [@caxy4](https://github.com/caxy4)
65
67
  * 1.2.6
@@ -97,6 +99,17 @@ languages: ["sv", "en", "de", "fr"]
97
99
 
98
100
  The first language in the array will be the default language, English, German and French will be added in to separate subfolders.
99
101
 
102
+ To avoid redundancy, it is possible to exclude files and folders from beeing copied to the localization folders.
103
+
104
+ ```yaml
105
+ exclude_from_localizations: ["javascript", "images", "css"]
106
+ ```
107
+ In code these specific files shoule be referenced via `baseurl_root`. E.g.
108
+
109
+ ```
110
+ <link rel="stylesheet" href="{{ "/css/bootstrap.css" | prepend: site.baseurl_root }}"/>
111
+ ```
112
+
100
113
  ###i18n
101
114
  Create this folder structure in your Jekyll project as an example:
102
115
 
@@ -227,6 +240,7 @@ This snippet will create a link that will toggle between Swedish and English. A
227
240
  5. Create new Pull Request
228
241
 
229
242
  ### Contributors
230
- - [Bersch](https://github.com/bersch), better paths
231
- - [Davrandom](https://github.com/davrandom), plugin usage example
232
- - [agramian](https://github.com/agramian), fallback to default language
243
+ - [@Bersch](https://github.com/bersch), better paths
244
+ - [@Davrandom](https://github.com/davrandom), plugin usage example
245
+ - [@agramian](https://github.com/agramian), fallback to default language
246
+ - [@h6](https://github.com/H6), exclude files from translation
@@ -18,6 +18,7 @@ module Jekyll
18
18
  config['baseurl_root'] = self.config['baseurl']
19
19
  baseurl_org = self.config['baseurl']
20
20
  languages = self.config['languages']
21
+ exclude_org = self.config['exclude']
21
22
  dest_org = self.dest
22
23
 
23
24
  #Loop
@@ -31,12 +32,16 @@ module Jekyll
31
32
  @dest = @dest + "/" + lang
32
33
  self.config['baseurl'] = self.config['baseurl'] + "/" + lang
33
34
  self.config['lang'] = lang
35
+ # exclude folders or files from beeing copied to all the language folders
36
+ exclude_from_localizations = self.config['exclude_from_localizations'] || []
37
+ self.config['exclude'] = exclude_org.concat(exclude_from_localizations)
34
38
  puts "Building site for language: \"#{self.config['lang']}\" to: #{self.dest}"
35
39
  process_org
36
40
 
37
41
  #Reset variables for next language
38
42
  @dest = dest_org
39
43
  self.config['baseurl'] = baseurl_org
44
+ self.config['exclude'] = exclude_org
40
45
  end
41
46
  Jekyll.setlangs({})
42
47
  puts 'Build complete'
@@ -2,7 +2,7 @@ module Jekyll
2
2
  module Multiple
3
3
  module Languages
4
4
  module Plugin
5
- VERSION = "1.2.7"
5
+ VERSION = "1.2.8"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-multiple-languages-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Kurtsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-29 00:00:00.000000000 Z
11
+ date: 2015-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler