octopress-multilingual 0.1.0 → 0.1.1

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: d574450d03a50e29229defe0ea43f9aa62c8052f
4
- data.tar.gz: 1a3203980d28af20e8bf76494680d069f3eec942
3
+ metadata.gz: e53c8c656e02f71a493c1e79cd8765dfbeafc2ae
4
+ data.tar.gz: 1aa1a62b8dce6b50647d1a1a646adf64986a8353
5
5
  SHA512:
6
- metadata.gz: 12682c041d6f53e83c69ec5f42de3494efa574a472c5e4e6a09b717bbb82b03d19f32dcc8228df1ea9d6dc6ea578bd19a18a62eaf462c2356902341c8cad8952
7
- data.tar.gz: 18361af1f5d6b236060a2314c9390121566908b36939c78ae70c53aa0dd10368ff38577d71a032d7d633ad1635629b728b3edb3fec7524d3dc0e21cc63465c78
6
+ metadata.gz: cadc57ee19e7ed3f90e57ecd3497720e5fcf0309c0b136bc119852af329d1fccebe2437c4fcd64b216a48464bafe6924d0730cd9b6b3dcff4997ccedbcb79d5b
7
+ data.tar.gz: fa6d4745b493a0060fa8eb5708ae4d75457843bdfc6a9a617df546982764217c90f5aacb46d4db5e28a3de81ce4115ea6c57460067d433405827da70a9106c20
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.1.1 (2015-01-30)
4
+ - Fix: On pages, `lang: default` now defaults to `site.lang`.
5
+
3
6
  ### 0.1.0 (2015-01-30)
4
7
  - Change: No longer filters `site.posts` at all.
5
8
  - Change: Posts are automatically filtered based on `page.lang`.
@@ -22,6 +22,12 @@ module Octopress
22
22
  class PagePayloadHook < Hooks::All
23
23
  priority :high
24
24
 
25
+ def post_init(item)
26
+ if item.lang == 'default'
27
+ item.data['lang'] = item.site.config['lang']
28
+ end
29
+ end
30
+
25
31
  # Swap out post arrays with posts of the approrpiate language
26
32
  #
27
33
  def merge_payload(payload, item)
@@ -23,9 +23,6 @@ module Jekyll
23
23
  class Page
24
24
  def lang
25
25
  if data['lang']
26
- if data['lang'].downcase == 'default'
27
- data['lang'] == site.lang
28
- end
29
26
  data['lang'].downcase
30
27
  end
31
28
  end
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Multilingual
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-multilingual
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis