cloudcannon-jekyll 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c8ffa6f24f23d77d8891582ae787a2a26b90d94bdfe8e6f31aaa7b9068fd10e
4
- data.tar.gz: b755136ed83f7f0facd35518fed62ea442a05b60b09241aeb385e7bdf1a665fe
3
+ metadata.gz: 5a1489947c5458dc3b86e9f9029907b96805cb5b07bdb19b32af7385f553e4ca
4
+ data.tar.gz: 025be6f5267d6189c84ebd6f6c1120bdb6f752c0e23188b14d5a9154a18ab856
5
5
  SHA512:
6
- metadata.gz: 9cf5db9ce6a3ba4c20a9a44d6c3a3ef86cc848d1020d375f7e080aa157674ed87d8c457c2319fada463f444846c85313b3185b2a2c87ec42b216e9f7b0674eae
7
- data.tar.gz: 150d2008c0792bd230d33a5aa9b8e1b518b18f8ae93c87f1490ff8704d1c3b0dd22c414ae03199f7b3e1d5ccfdee22dd852970eb5f6905f038da8b8ecf86614b
6
+ metadata.gz: 56fb7b286b350a9a976facd293de984fe7d5a09ee7c8a53b35b505a815360069c2a54729573ac3fabe2bac7e705b0fcc037258f1d4edd0111c7f91feefc5b4f8
7
+ data.tar.gz: c1768862573f74c2d8b6cf3241759b1776c538abc5f731fbc3848206f98eb8898d9a563017a556a1e78910b313d4ffe2db6fb7cf0a439c2be59297248806c93e
@@ -16,4 +16,4 @@ env:
16
16
  - JEKYLL_VERSION="2.4.0"
17
17
  - JEKYLL_VERSION="3.0.0"
18
18
  - JEKYLL_VERSION="3.8.5"
19
- - JEKYLL_VERSION="4.0.0"
19
+ - JEKYLL_VERSION="4.1.1"
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.1.0
2
+
3
+ * Add support for including only specified `data` keys
4
+
1
5
  # 1.0.3
2
6
 
3
7
  * Fix invalid JSON issue for sites built with Jekyll 2 and no collections
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_development_dependency "rake", "~> 13.0"
27
27
  spec.add_development_dependency "rspec", "~> 3.9"
28
- spec.add_development_dependency "rubocop", "~> 0.71"
29
- spec.add_development_dependency "rubocop-jekyll", "~> 0.10"
28
+ spec.add_development_dependency "rubocop", "~> 0.80"
29
+ spec.add_development_dependency "rubocop-jekyll", "~> 0.11"
30
30
  end
@@ -13,8 +13,10 @@
13
13
  "kramdown": {{ site.kramdown | cc_safe_jsonify }},
14
14
  "commonmark": {{ site.commonmark | cc_safe_jsonify }}
15
15
  }
16
- },{% if site.cloudcannon.data %}
17
- "data": {{ site.data | cc_safe_jsonify }},{% endif %}
16
+ },{% if site.cloudcannon.data.first %}{% assign data_seen = false %}
17
+ "data": {
18
+ {% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_safe_jsonify }}: {{ data[1] | cc_safe_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
19
+ {% elsif site.cloudcannon.data %}"data": {{ site.data | cc_safe_jsonify }},{% endif %}
18
20
  "collections": {
19
21
  "posts": {{ site.posts | reverse | cc_safe_jsonify }}{% if site.collections.size > 0 %},{% endif %}
20
22
  {% for collection in site.collections %}"{{ collection[0] | xml_escape }}": {{ collection[1].docs | cc_safe_jsonify }}{% unless forloop.last %},{% endunless %}
@@ -13,8 +13,10 @@
13
13
  "kramdown": {{ site.kramdown | cc_safe_jsonify }},
14
14
  "commonmark": {{ site.commonmark | cc_safe_jsonify }}
15
15
  }
16
- },{% if site.cloudcannon.data %}
17
- "data": {{ site.data | cc_safe_jsonify }},{% endif %}
16
+ },{% if site.cloudcannon.data.first %}{% assign data_seen = false %}
17
+ "data": {
18
+ {% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_safe_jsonify }}: {{ data[1] | cc_safe_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
19
+ {% elsif site.cloudcannon.data %}"data": {{ site.data | cc_safe_jsonify }},{% endif %}
18
20
  "collections": {
19
21
  {% for collection in site.collections %}"{{ collection.label | xml_escape }}": {{ collection.docs | cc_safe_jsonify }}{% unless forloop.last %},{% endunless %}
20
22
  {% endfor %}
@@ -14,14 +14,26 @@
14
14
  "commonmark": {{ site.commonmark | cc_safe_jsonify }}
15
15
  }
16
16
  },
17
- {%- if site.cloudcannon.data %}
17
+ {% if site.cloudcannon.data.first -%}
18
+ "data": {
19
+ {%- assign data_seen = false %}
20
+ {%- for data in site.data %}
21
+ {%- assign key = data[0] %}
22
+ {%- if site.cloudcannon.data[key] %}
23
+ {%- if data_seen %},{% endif -%}
24
+ {{ data[0] | cc_safe_jsonify }}: {{ data[1] | cc_safe_jsonify }}
25
+ {%- assign data_seen = true %}
26
+ {%- endif %}
27
+ {%- endfor -%}
28
+ },
29
+ {% elsif site.cloudcannon.data -%}
18
30
  "data": {{ site.data | cc_safe_jsonify }},
19
- {% endif %}
31
+ {%- endif %}
20
32
  "collections": {
21
- {% for collection in site.collections -%}
33
+ {%- for collection in site.collections -%}
22
34
  "{{ collection.label | xml_escape }}": {{ collection.docs | cc_safe_jsonify }}
23
35
  {%- unless forloop.last %},{% endunless %}
24
- {%- endfor %}
36
+ {%- endfor -%}
25
37
  },
26
38
  "pages": {{ site.pages | cc_safe_jsonify }},
27
39
  "static": {{ site.static_files | cc_static_files_jsonify }}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudCannonJekyll
4
- VERSION = "1.0.3"
4
+ VERSION = "1.1.0"
5
5
  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.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudCannon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-19 00:00:00.000000000 Z
11
+ date: 2020-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -64,28 +64,28 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.71'
67
+ version: '0.80'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.71'
74
+ version: '0.80'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rubocop-jekyll
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.10'
81
+ version: '0.11'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.10'
88
+ version: '0.11'
89
89
  description: Creates CloudCannon editor details for Jekyll
90
90
  email:
91
91
  - support@cloudcannon.com