cloudcannon-jekyll 3.0.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/HISTORY.md +5 -0
- data/lib/cloudcannon-jekyll/generators/collections.rb +17 -8
- data/lib/cloudcannon-jekyll/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0fed35269d24b4a1fd24b64ff5d89264e69e31b4d2b1451923824ae994ed43df
|
|
4
|
+
data.tar.gz: 3f0338deb85d35b56f577f90408ad11660479a05d203ce4b5a17588b44439e0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20e086e703f86bf8221b88cc9e419b7f1715976a42fa736a0e0d08df2a1e062b583f0bfdb201f2ee5bfde4cbd1e8a2a8bb0f23436eaba8e5b3275467fec9e08e
|
|
7
|
+
data.tar.gz: 728c3feb864fcc8eed871fd188d4304870733e66074657af3a5ceeef4760d4f38478b59dacfa606c454adde6ff8ba15e45f0da82082535858316cc666d76b027
|
data/HISTORY.md
CHANGED
|
@@ -24,7 +24,8 @@ module CloudCannonJekyll
|
|
|
24
24
|
|
|
25
25
|
def generate_collections_config
|
|
26
26
|
collections = @site.config['collections'] || {}
|
|
27
|
-
|
|
27
|
+
input_collections_config = @config['collections_config'] || {}
|
|
28
|
+
collections_config = input_collections_config.reject { |_, v| v == false }
|
|
28
29
|
|
|
29
30
|
return collections_config if @config['collections_config_override']
|
|
30
31
|
|
|
@@ -56,6 +57,8 @@ module CloudCannonJekyll
|
|
|
56
57
|
collection_keys = (defaults.keys + collections.keys).uniq
|
|
57
58
|
|
|
58
59
|
collection_keys.each do |key|
|
|
60
|
+
next if input_collections_config[key] == false
|
|
61
|
+
|
|
59
62
|
processed = (defaults[key] || {})
|
|
60
63
|
.merge(collections[key] || {})
|
|
61
64
|
.merge(collections_config[key] || {})
|
|
@@ -71,6 +74,8 @@ module CloudCannonJekyll
|
|
|
71
74
|
end
|
|
72
75
|
|
|
73
76
|
@split_posts.each_key do |key|
|
|
77
|
+
next if input_collections_config[key] == false
|
|
78
|
+
|
|
74
79
|
posts_path = @split_posts[key]&.first&.relative_path&.sub(%r{(^|/)_posts.*}, '\1_posts')
|
|
75
80
|
next unless posts_path
|
|
76
81
|
|
|
@@ -84,6 +89,8 @@ module CloudCannonJekyll
|
|
|
84
89
|
end
|
|
85
90
|
|
|
86
91
|
@split_drafts.each_key do |key|
|
|
92
|
+
next if input_collections_config[key] == false
|
|
93
|
+
|
|
87
94
|
drafts_path = @split_drafts[key]&.first&.relative_path&.sub(%r{(^|/)_drafts.*}, '\1_drafts')
|
|
88
95
|
next unless drafts_path
|
|
89
96
|
|
|
@@ -113,6 +120,10 @@ module CloudCannonJekyll
|
|
|
113
120
|
collections_config.each_key do |key|
|
|
114
121
|
next if key == 'data'
|
|
115
122
|
|
|
123
|
+
collections[key] ||= []
|
|
124
|
+
|
|
125
|
+
next if collections_config.dig(key, 'parser') == false
|
|
126
|
+
|
|
116
127
|
collections[key] = if key == 'posts' || key.end_with?('/posts')
|
|
117
128
|
@split_posts[key]
|
|
118
129
|
elsif key == 'drafts' || key.end_with?('/drafts')
|
|
@@ -167,14 +178,12 @@ module CloudCannonJekyll
|
|
|
167
178
|
end
|
|
168
179
|
|
|
169
180
|
def legacy_document_data(doc)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
date: doc.date
|
|
175
|
-
}
|
|
176
|
-
)
|
|
181
|
+
legacy_data = {}
|
|
182
|
+
legacy_data['categories'] = doc.categories if doc.respond_to?(:categories)
|
|
183
|
+
legacy_data['tags'] = doc.tags if doc.respond_to?(:tags)
|
|
184
|
+
legacy_data['date'] = doc.date if doc.respond_to?(:date)
|
|
177
185
|
|
|
186
|
+
data = doc.data.merge(legacy_data)
|
|
178
187
|
data['slug'] = doc.slug if doc.respond_to?(:slug)
|
|
179
188
|
data
|
|
180
189
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudcannon-jekyll
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- CloudCannon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
120
|
- !ruby/object:Gem::Version
|
|
121
121
|
version: '0'
|
|
122
122
|
requirements: []
|
|
123
|
-
rubygems_version: 3.
|
|
123
|
+
rubygems_version: 3.1.6
|
|
124
124
|
signing_key:
|
|
125
125
|
specification_version: 4
|
|
126
126
|
summary: CloudCannon Jekyll integration
|