cloudcannon-jekyll 2.1.0 → 2.2.0
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/lib/cloudcannon-jekyll/_cloudcannon/info-2.x.json +1 -4
- data/lib/cloudcannon-jekyll/_cloudcannon/info-3.0-4.x.json +1 -4
- data/lib/cloudcannon-jekyll/_cloudcannon/info.json +1 -15
- data/lib/cloudcannon-jekyll/generator.rb +16 -0
- 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: 34076270fab6ebafaa9530d0898bc08274f902cc86e6fb2e13890d4a69440854
|
|
4
|
+
data.tar.gz: 4036d2f037e7c36e31c112fcf4b296bd4afbb44f8d643aba36909108893b3b86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ebaeaf4c7678a09859d0a845b1e4280c88ca1606099cf3e19ab7cc5a4d5a0ee2d2b18b5e827204d528915ed6d5281b089d9aa2baec4e0537d8efe5e0c263223
|
|
7
|
+
data.tar.gz: 63e881e3242696fa1faad9ae166a0e121ab58a5895782c2eb2d3c474401da7993c7a40cf138cb22195bfcdf8c092a3ba446f1de4f0fd1eb5b50ca0469b8e72c0
|
|
@@ -26,10 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"pages": {{ site.html_pages | cc_jsonify }},
|
|
28
28
|
"static-pages": {{ site.static_files | cc_static_files_jsonify }},
|
|
29
|
-
|
|
30
|
-
"data": {
|
|
31
|
-
{% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_jsonify }}: {{ data[1] | cc_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
|
|
32
|
-
{% elsif site.cloudcannon.data %}"data": {{ site.data | cc_jsonify }},{% endif %}
|
|
29
|
+
"data": {{ data | cc_jsonify }},
|
|
33
30
|
{% if config.baseurl %}
|
|
34
31
|
"base-url": {{ config.baseurl | cc_jsonify }},
|
|
35
32
|
{% endif %}
|
|
@@ -25,10 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"pages": {{ site.html_pages | cc_jsonify }},
|
|
27
27
|
"static-pages": {{ site.static_files | cc_static_files_jsonify }},
|
|
28
|
-
|
|
29
|
-
"data": {
|
|
30
|
-
{% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] | cc_jsonify }}: {{ data[1] | cc_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
|
|
31
|
-
{% elsif site.cloudcannon.data %}"data": {{ site.data | cc_jsonify }},{% endif %}
|
|
28
|
+
"data": {{ data | cc_jsonify }},
|
|
32
29
|
{% if config.baseurl %}
|
|
33
30
|
"base-url": {{ config.baseurl | cc_jsonify }},
|
|
34
31
|
{% endif %}
|
|
@@ -27,21 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"pages": {{ site.html_pages | cc_jsonify }},
|
|
29
29
|
"static-pages": {{ site.static_files | cc_static_files_jsonify }},
|
|
30
|
-
{
|
|
31
|
-
"data": {
|
|
32
|
-
{%- assign data_seen = false %}
|
|
33
|
-
{%- for data in site.data %}
|
|
34
|
-
{%- assign key = data[0] %}
|
|
35
|
-
{%- if site.cloudcannon.data[key] %}
|
|
36
|
-
{%- if data_seen %},{% endif -%}
|
|
37
|
-
{{ data[0] | cc_jsonify }}: {{ data[1] | cc_jsonify }}
|
|
38
|
-
{%- assign data_seen = true %}
|
|
39
|
-
{%- endif %}
|
|
40
|
-
{%- endfor -%}
|
|
41
|
-
},
|
|
42
|
-
{% elsif site.cloudcannon.data -%}
|
|
43
|
-
"data": {{ site.data | cc_jsonify }},
|
|
44
|
-
{%- endif %}
|
|
30
|
+
"data": {{ data | cc_jsonify }},
|
|
45
31
|
{% if config.baseurl -%}
|
|
46
32
|
"base-url": {{ config.baseurl | cc_jsonify }},
|
|
47
33
|
{%- endif %}
|
|
@@ -18,6 +18,7 @@ module CloudCannonJekyll
|
|
|
18
18
|
@reader = Reader.new(@site)
|
|
19
19
|
|
|
20
20
|
collections_config = process_collections_config
|
|
21
|
+
data = process_data
|
|
21
22
|
|
|
22
23
|
payload = @site.site_payload.merge({
|
|
23
24
|
"gem_version" => CloudCannonJekyll::VERSION,
|
|
@@ -33,6 +34,7 @@ module CloudCannonJekyll
|
|
|
33
34
|
"config" => @site.config,
|
|
34
35
|
"collections_config" => collections_config,
|
|
35
36
|
"drafts" => drafts,
|
|
37
|
+
"data" => data,
|
|
36
38
|
}))
|
|
37
39
|
end
|
|
38
40
|
|
|
@@ -55,6 +57,20 @@ module CloudCannonJekyll
|
|
|
55
57
|
@site.config["collections_dir"] || ""
|
|
56
58
|
end
|
|
57
59
|
|
|
60
|
+
def process_data
|
|
61
|
+
cc_data = @site.config.dig("cloudcannon", "data")
|
|
62
|
+
data = if cc_data == true
|
|
63
|
+
@site.data&.dup
|
|
64
|
+
elsif cc_data&.is_a?(Hash)
|
|
65
|
+
@site.data&.select { |key, _| cc_data.key?(key) }
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
data ||= {}
|
|
69
|
+
data["categories"] ||= @site.categories.keys
|
|
70
|
+
data["tags"] ||= @site.tags.keys
|
|
71
|
+
data
|
|
72
|
+
end
|
|
73
|
+
|
|
58
74
|
def data_dir
|
|
59
75
|
@site.config["data_dir"] || "_data"
|
|
60
76
|
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: 2.
|
|
4
|
+
version: 2.2.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-08-
|
|
11
|
+
date: 2021-08-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|