cloudcannon-jekyll 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- 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: 29ba7626e36d9eda34cdc67fe54a1961c7fc8ea6af3b61d2bfe8e9f7074483c8
|
4
|
+
data.tar.gz: 82ea5cfc99366153d6464125652c200ccf0971fca780cf9d5cfbbe5bb70fd9c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 958d22f6c30642a9ef324aba1938768a8b7337b948f33780f2545a310c12e9535328a52367fa888d267a18b6572d07ef1d7387fdab9956211830c448946b52c2
|
7
|
+
data.tar.gz: 6c2dee57baf7d6fac11898094e3292c89559ac4d5077b898efdc65c1901df351101d37ef240de02eebd2db2dc2adfc9bd288ca232d7f9b3bd4f9ba8aeb36b177
|
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
|
@@ -108,7 +108,7 @@ module CloudCannonJekyll
|
|
108
108
|
end
|
109
109
|
|
110
110
|
def self.document_to_json(input, depth, max_depth)
|
111
|
-
prevent = %w(dir
|
111
|
+
prevent = %w(dir relative_path url collection)
|
112
112
|
|
113
113
|
out = [
|
114
114
|
"\"path\": #{JsonifyFilter.to_json(input.relative_path, depth, max_depth)}",
|
@@ -121,6 +121,10 @@ module CloudCannonJekyll
|
|
121
121
|
out.push("\"collection\": #{collection_json}")
|
122
122
|
end
|
123
123
|
|
124
|
+
if input.respond_to? :id
|
125
|
+
out.push("\"id\": #{JsonifyFilter.to_json(input.id, depth, max_depth)}")
|
126
|
+
end
|
127
|
+
|
124
128
|
out += JsonifyFilter.document_data_to_a(input.data, prevent, depth, max_depth)
|
125
129
|
"{#{out.join(",")}}"
|
126
130
|
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: 0.3.
|
4
|
+
version: 0.3.4
|
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
|