jekyll-theme-open-project-helpers 1.1.16 → 1.1.17
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fad190658ba13e26671d06f21719d518af3528469e36a5dd7818da16b295f514
|
4
|
+
data.tar.gz: 71f8d586a0ed944fceb6385fdc4b90b80faa6b52b033cff3e293d2f139c90dee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f13e4d98612231c61aecc8ffbb2bee5727b4f19e1488b8a94289b9fd7f0517a7148892ff85ce8f8dc844297a85e18f01238efe2868f82328b97c05e1e498da4
|
7
|
+
data.tar.gz: 5de24d824b543a2d26ee8cfaffe080a88efe78e2183092b62ca0f65d0b64c2b3c72da2935a08ce1822cf4e858c32b1a554001a6709e9cde4e386556922bb1d31
|
@@ -85,9 +85,9 @@ module Jekyll
|
|
85
85
|
safe true
|
86
86
|
|
87
87
|
def generate(site)
|
88
|
-
site.config['
|
89
|
-
site.config['
|
90
|
-
site.config['
|
88
|
+
site.config['max_featured_software'] = 3
|
89
|
+
site.config['max_featured_specs'] = 3
|
90
|
+
site.config['max_featured_posts'] = 3
|
91
91
|
|
92
92
|
INDEXES.each do |index_name, params|
|
93
93
|
if site.config['is_hub']
|
@@ -98,11 +98,32 @@ module Jekyll
|
|
98
98
|
|
99
99
|
if site.collections.key? collection_name
|
100
100
|
# Filters items from given collection_name through item_test function
|
101
|
+
# and makes items available in templates via e.g. site.all_specs, site.all_software
|
102
|
+
|
101
103
|
items = site.collections[collection_name].docs.select { |item| params[:item_test].call(item) }
|
102
104
|
|
103
|
-
|
105
|
+
if site.config['is_hub']
|
106
|
+
items.map! do |item|
|
107
|
+
project_name = item.url.split('/')[2]
|
108
|
+
project_path = "_projects/#{project_name}/index.md"
|
109
|
+
|
110
|
+
item.data[:project_name] = project_name
|
111
|
+
item.data[:project_data] = site.collections['projects'].docs.select { |proj| proj.path.end_with? project_path } [0]
|
112
|
+
|
113
|
+
item
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
104
117
|
site.config["all_#{index_name}"] = items
|
105
118
|
site.config["num_all_#{index_name}"] = items.size
|
119
|
+
|
120
|
+
featured_items = items.select { |item| item.data['feature_with_priority'] != nil }
|
121
|
+
site.config["featured_#{index_name}"] = featured_items
|
122
|
+
site.config["num_featured_#{index_name}"] = featured_items.size
|
123
|
+
|
124
|
+
non_featured_items = items.select { |item| item.data['feature_with_priority'] == nil }
|
125
|
+
site.config["non_featured_#{index_name}"] = non_featured_items
|
126
|
+
site.config["num_non_featured_#{index_name}"] = non_featured_items.size
|
106
127
|
end
|
107
128
|
end
|
108
129
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-open-project-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|