cloudcannon-jekyll 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +9 -0
- data/lib/cloudcannon-jekyll/generator.rb +4 -1
- data/lib/cloudcannon-jekyll/jsonify-filter.rb +1 -1
- data/lib/cloudcannon-jekyll/reader.rb +11 -17
- 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: 1622ca2b9f7eef0279882f94f4364c67ffdd9c403dbfc345bc882268ecd0f998
|
4
|
+
data.tar.gz: e3dab9c9f8fb8090c16c4c3c963566143bfe9a7d4fc18f674c1b33691c377575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 748183e00870b67a650ce2cd0386519faffc651750504804bd66d0dd133576a714221d64405d7afc9729558ec6eb8719e3105ee349b4155c53c87af3fffc3351
|
7
|
+
data.tar.gz: e3d770a079ae5a349b7ceec3c1dc4db930bd294a3856c991520bdfe8624a901d00749f37b4fb825dbdfa1e56f67934179c8b0f0ac585968ec9cc30483e50d96b
|
data/HISTORY.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# 1.5.3
|
2
|
+
|
3
|
+
* Rework fallback for older versions of Jekyll when reading data, posts and drafts
|
4
|
+
* Fix deprecation warning for `posts.map`
|
5
|
+
|
1
6
|
# 1.5.2
|
2
7
|
|
3
8
|
* Fix for empty collection configurations
|
@@ -17,6 +22,10 @@
|
|
17
22
|
* Add `url` to static-pages
|
18
23
|
* Normalise `_path` in static-pages
|
19
24
|
|
25
|
+
# 1.4.3
|
26
|
+
|
27
|
+
* Fix off-by-one depth for nested documents from last change
|
28
|
+
|
20
29
|
# 1.4.2
|
21
30
|
|
22
31
|
* Added max depth parameter for jsonify filter and increase it for array structures in config output
|
@@ -49,11 +49,13 @@ module CloudCannonJekyll
|
|
49
49
|
@site.config["data_dir"] || "_data"
|
50
50
|
end
|
51
51
|
|
52
|
+
# rubocop:disable Metrics/AbcSize
|
52
53
|
def add_category_folder_config(collections_config, posts_config = {})
|
53
54
|
posts = @site.posts || @site.collections["posts"]
|
55
|
+
docs = posts.class.method_defined?(:docs) ? posts.docs : posts
|
54
56
|
seen = {}
|
55
57
|
|
56
|
-
|
58
|
+
docs.map do |post|
|
57
59
|
parts = post.relative_path.split("/_posts/")
|
58
60
|
path = parts.first
|
59
61
|
|
@@ -80,6 +82,7 @@ module CloudCannonJekyll
|
|
80
82
|
path
|
81
83
|
end
|
82
84
|
end
|
85
|
+
# rubocop:enable Metrics/AbcSize
|
83
86
|
|
84
87
|
# Add data to collections config if raw data files exist
|
85
88
|
def add_data_config(collections_config)
|
@@ -167,7 +167,7 @@ module CloudCannonJekyll
|
|
167
167
|
def self.to_json(input, depth, max_depth = 9, key_swaps = {})
|
168
168
|
depth += 1
|
169
169
|
|
170
|
-
if depth > max_depth || (depth >
|
170
|
+
if depth > max_depth || (depth > 3 && JsonifyFilter.document_type?(input))
|
171
171
|
'"MAXIMUM_DEPTH"'
|
172
172
|
elsif JsonifyFilter.simple_type?(input)
|
173
173
|
input.to_json
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require "jekyll"
|
4
4
|
|
5
|
-
|
5
|
+
begin
|
6
6
|
require_relative "readers/data-reader"
|
7
|
-
|
7
|
+
rescue NameError
|
8
8
|
require_relative "readers/old-data-reader"
|
9
9
|
end
|
10
10
|
|
@@ -18,27 +18,21 @@ module CloudCannonJekyll
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def read_data(dir = "_data")
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
CloudCannonJekyll::DataReader.new(@site).read(dir)
|
25
|
-
end
|
21
|
+
CloudCannonJekyll::DataReader.new(@site).read(dir)
|
22
|
+
rescue NameError # DataReader doesn't exist in old versions of Jekyll
|
23
|
+
CloudCannonJekyll::OldDataReader.new(@site).read(dir)
|
26
24
|
end
|
27
25
|
|
28
26
|
def read_drafts(dir = "")
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
Jekyll::PostReader.new(@site).read_drafts(dir)
|
33
|
-
end
|
27
|
+
Jekyll::PostReader.new(@site).read_drafts(dir)
|
28
|
+
rescue NameError # PostReader doesn't exist in old versions of Jekyll
|
29
|
+
@site.read_content(dir, "_drafts", Jekyll::Draft)
|
34
30
|
end
|
35
31
|
|
36
32
|
def read_posts(dir = "")
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
Jekyll::PostReader.new(@site).read_posts(dir)
|
41
|
-
end
|
33
|
+
Jekyll::PostReader.new(@site).read_posts(dir)
|
34
|
+
rescue NameError # PostReader doesn't exist in old versions of Jekyll
|
35
|
+
@site.read_content(dir, "_posts", Jekyll::Post)
|
42
36
|
end
|
43
37
|
end
|
44
38
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CloudCannon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|