cloudcannon-jekyll 1.5.4 → 1.5.5
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/generator.rb +2 -2
- data/lib/cloudcannon-jekyll/jsonify-filter.rb +5 -1
- data/lib/cloudcannon-jekyll/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 431460a2de8c6f3ec5dbfeb75e2354c48f25ac80f4761ef926dbee4fbdf10f63
|
4
|
+
data.tar.gz: 255202d3a0205cc9ee087d93ae2a96c59bbf662d3b335193cd6f2dedde6a917d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef6b43da5dc6bcdf08a8f8a7b711bb2b2a73cd28a48729c194eef89d7fbdc80bce2cf298f52fecb09695dbe25a0887f266f8e36887f8d888a29d41b8b6bfb23a
|
7
|
+
data.tar.gz: d456a64c940b19738d6588b9a69c05d69b3f13c143ffa849f028df78cde665152f723be143760cfa964244bc914950b3634099a62b2ca04a2293291d46523e64
|
data/HISTORY.md
CHANGED
@@ -13,7 +13,7 @@ module CloudCannonJekyll
|
|
13
13
|
@site = site
|
14
14
|
@reader = Reader.new(@site)
|
15
15
|
|
16
|
-
collections_config = @site.config["collections"]
|
16
|
+
collections_config = @site.config["collections"]&.dup || {}
|
17
17
|
|
18
18
|
# Workaround for empty collection configurations
|
19
19
|
collections_config.each_key do |key|
|
@@ -96,7 +96,7 @@ module CloudCannonJekyll
|
|
96
96
|
drafts = @reader.read_drafts(collections_dir)
|
97
97
|
|
98
98
|
if collections_config.key?("posts")
|
99
|
-
collections_config["drafts"] = collections_config["posts"]
|
99
|
+
collections_config["drafts"] = collections_config["posts"]&.dup || {}
|
100
100
|
elsif drafts.any?
|
101
101
|
collections_config["drafts"] = {}
|
102
102
|
end
|
@@ -107,7 +107,7 @@ module CloudCannonJekyll
|
|
107
107
|
end
|
108
108
|
|
109
109
|
def self.document_to_json(input, depth, max_depth)
|
110
|
-
prevent = %w(dir
|
110
|
+
prevent = %w(dir relative_path url collection)
|
111
111
|
|
112
112
|
out = [
|
113
113
|
"\"path\": #{JsonifyFilter.to_json(input.relative_path, depth, max_depth)}",
|
@@ -120,6 +120,10 @@ module CloudCannonJekyll
|
|
120
120
|
out.push("\"collection\": #{collection_json}")
|
121
121
|
end
|
122
122
|
|
123
|
+
if input.respond_to? :id
|
124
|
+
out.push("\"id\": #{JsonifyFilter.to_json(input.id, depth, max_depth)}")
|
125
|
+
end
|
126
|
+
|
123
127
|
out += JsonifyFilter.document_data_to_a(input.data, prevent, depth, max_depth)
|
124
128
|
"{#{out.join(",")}}"
|
125
129
|
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: 1.5.
|
4
|
+
version: 1.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CloudCannon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|