cloudcannon-jekyll 3.0.1 → 3.2.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 +13 -0
- data/lib/cloudcannon-jekyll/generators/collections.rb +20 -10
- data/lib/cloudcannon-jekyll/generators/info.rb +2 -0
- data/lib/cloudcannon-jekyll/version.rb +1 -1
- data/script/test-all-versions +1 -0
- 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: 9baa033589ad0787d46384652694369f7c248193077e52f716247f3082e7495d
|
|
4
|
+
data.tar.gz: 41c931e79f60de4b039009e9149f29df7e9eb77680ace64f393adc98a565feba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 850dc955f1fe35f6b2cce96ef442ca6cd85f4db8f6a7451970fed196f04872a130e152f702bec6401dea979e205009fb431d545fb4b275cc6de0e8004ae18234
|
|
7
|
+
data.tar.gz: fec4d32d0a6e270839e1d8b8acd1e336e639f9040fd3340684fec906cf7ef1285e8e29d5e1d86daf20b9b37deedca409704e75bb882aebe8bcddc60eb9099b14
|
data/HISTORY.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# 3.2.0
|
|
2
|
+
|
|
3
|
+
* Add dam_uploads and dam_static to paths
|
|
4
|
+
|
|
5
|
+
# 3.1.0
|
|
6
|
+
|
|
7
|
+
* Add options for ignoring and preventing parsing collections
|
|
8
|
+
* Fix potential null reference
|
|
9
|
+
|
|
10
|
+
# 3.0.2
|
|
11
|
+
|
|
12
|
+
* Remove excerpt from output
|
|
13
|
+
|
|
1
14
|
# 3.0.1
|
|
2
15
|
|
|
3
16
|
* Support aliases in YAML configuration files
|
|
@@ -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')
|
|
@@ -157,7 +168,7 @@ module CloudCannonJekyll
|
|
|
157
168
|
def document_type(doc)
|
|
158
169
|
if IS_JEKYLL_2_X_X && (doc.instance_of?(Jekyll::Post) || doc.instance_of?(Jekyll::Draft))
|
|
159
170
|
:posts
|
|
160
|
-
elsif doc.respond_to?
|
|
171
|
+
elsif doc.respond_to?(:type)
|
|
161
172
|
doc.type
|
|
162
173
|
elsif doc.respond_to?(:collection)
|
|
163
174
|
doc.collection.label.to_sym
|
|
@@ -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
|
|
@@ -188,11 +197,12 @@ module CloudCannonJekyll
|
|
|
188
197
|
data = if legacy_doc?(doc)
|
|
189
198
|
legacy_document_data(doc)
|
|
190
199
|
elsif doc.respond_to?(:data)
|
|
191
|
-
doc.data
|
|
200
|
+
doc.data.dup
|
|
192
201
|
else
|
|
193
202
|
{}
|
|
194
203
|
end
|
|
195
204
|
|
|
205
|
+
data.delete('excerpt')
|
|
196
206
|
defaults = @site.frontmatter_defaults.all(doc.relative_path, document_type(doc))
|
|
197
207
|
defaults.merge(data)
|
|
198
208
|
end
|
|
@@ -70,6 +70,8 @@ module CloudCannonJekyll
|
|
|
70
70
|
{
|
|
71
71
|
static: '',
|
|
72
72
|
uploads: @config.dig('paths', 'uploads') || 'uploads',
|
|
73
|
+
dam_uploads: @config.dig('paths', 'dam_uploads') || '',
|
|
74
|
+
dam_static: @config.dig('paths', 'dam_static') || '',
|
|
73
75
|
data: @data_dir,
|
|
74
76
|
collections: @collections_dir,
|
|
75
77
|
layouts: @site_config['layouts_dir'] || '_layouts'
|
data/script/test-all-versions
CHANGED
|
@@ -4,6 +4,7 @@ set -ex
|
|
|
4
4
|
|
|
5
5
|
JEKYLL_VERSION=2.4.0 bundle update && $(dirname "$0")/test &&
|
|
6
6
|
JEKYLL_VERSION=3.0.0 bundle update && $(dirname "$0")/test &&
|
|
7
|
+
JEKYLL_VERSION=3.3.1 bundle update && $(dirname "$0")/test &&
|
|
7
8
|
JEKYLL_VERSION=3.8.5 bundle update && $(dirname "$0")/test &&
|
|
8
9
|
JEKYLL_VERSION=4.2.1 bundle update && $(dirname "$0")/test
|
|
9
10
|
|
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.2.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-08-30 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
|