octopress-multilingual 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/octopress-multilingual/version.rb +1 -1
- data/lib/octopress-multilingual.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e31571f420ab5d1cfc9e2ce4acf3b7f8b18edb69
|
4
|
+
data.tar.gz: 2c7b824b3dc4ea330d15d95a51edce0a9dd9785a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7de843a153b09bc68e532a9d65eb1d1f57ce13593b5050516eb289aed4a0a44d75b024f261b07990abc6e2d4801ec088728e2d30ae8440286ab2227f5c46429
|
7
|
+
data.tar.gz: e7a3105e08ec75ef940954a06a44f164a680bb26647d92d52ecb655d6d60011fdb8ad1d992e5c6da2880fdd33ad7244876f6428b7c19d011f795abd32cc8c7d2
|
data/CHANGELOG.md
CHANGED
@@ -27,13 +27,13 @@ module Octopress
|
|
27
27
|
|
28
28
|
def posts_by_language
|
29
29
|
@posts_by_language ||= begin
|
30
|
-
posts = site.posts.select(&:lang).group_by(&:lang) \
|
30
|
+
posts = site.posts.reverse.select(&:lang).group_by(&:lang) \
|
31
31
|
## Add posts that crosspost to all languages
|
32
32
|
.each do |lang, posts|
|
33
33
|
if lang == main_language
|
34
34
|
posts.clear.concat(main_language_posts)
|
35
35
|
else
|
36
|
-
posts.concat(crossposts).sort_by(&:date)
|
36
|
+
posts.concat(crossposts).sort_by(&:date).reverse
|
37
37
|
end
|
38
38
|
end
|
39
39
|
posts
|
@@ -41,14 +41,14 @@ module Octopress
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def main_language_posts
|
44
|
-
site.posts.reject do |post|
|
44
|
+
site.posts.reverse.reject do |post|
|
45
45
|
post.lang && post.lang != main_language
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
49
|
def crossposts
|
50
50
|
@cross_posts ||= begin
|
51
|
-
posts = site.posts.select do |post|
|
51
|
+
posts = site.posts.reverse.select do |post|
|
52
52
|
post.data['crosspost_languages']
|
53
53
|
end
|
54
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-multilingual
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octopress-hooks
|