cloudcannon-jekyll 1.5.7 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/HISTORY.md +4 -0
- data/lib/cloudcannon-jekyll/jsonify-filter.rb +12 -4
- 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: 10ce07fce474de172ceafec1ecbe0a0d4e6d012d2357befc0cef41e2418a992e
|
4
|
+
data.tar.gz: 418f38e206327042999eca17c901477e7fd864bce425a5410a6b49cc503760f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db5ebdba978110b1b312dafb9b1e3f9928edd4259b9095af266a2be1964bdf3028a0fe303080353b8a5a18685ae52705dd630cf16285e1be9f7c129c328fc525
|
7
|
+
data.tar.gz: 76f36521f6b0888b90be9e0a071bd5c3258e97ec2623d996ebf3a5cdc7f0f3f771e35bf6b0f258f4e5654538e7dcc17524f32fd37223414b0cb5ffbf8f24700d
|
data/.gitignore
CHANGED
data/HISTORY.md
CHANGED
@@ -106,17 +106,25 @@ module CloudCannonJekyll
|
|
106
106
|
"{#{out.join(",")}}"
|
107
107
|
end
|
108
108
|
|
109
|
+
def self.document_path(input)
|
110
|
+
collections_dir = input.site.config["collections_dir"] || ""
|
111
|
+
if input.collection && !collections_dir.empty?
|
112
|
+
"#{collections_dir}/#{input.relative_path}"
|
113
|
+
else
|
114
|
+
input.relative_path
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
109
118
|
def self.document_to_json(input, depth, max_depth)
|
110
119
|
prevent = %w(dir relative_path url collection)
|
111
120
|
|
112
121
|
out = [
|
113
|
-
"\"path\": #{JsonifyFilter.to_json(input
|
122
|
+
"\"path\": #{JsonifyFilter.to_json(JsonifyFilter.document_path(input), depth, max_depth)}",
|
114
123
|
"\"url\": #{JsonifyFilter.to_json(input.url, depth, max_depth)}",
|
115
124
|
]
|
116
125
|
|
117
|
-
|
118
|
-
|
119
|
-
collection_json = JsonifyFilter.to_json(collection.label, depth, max_depth)
|
126
|
+
unless input.collection.nil?
|
127
|
+
collection_json = JsonifyFilter.to_json(input.collection.label, depth, max_depth)
|
120
128
|
out.push("\"collection\": #{collection_json}")
|
121
129
|
end
|
122
130
|
|
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.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CloudCannon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|