cloudcannon-jekyll 0.1.0 → 0.3.2
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/.github/workflows/stale.yml +19 -0
- data/.reek.yml +6 -0
- data/.rubocop.yml +24 -2
- data/.travis.yml +2 -1
- data/Gemfile +2 -0
- data/HISTORY.md +43 -0
- data/cloudcannon-jekyll.gemspec +3 -3
- data/lib/cloudcannon-jekyll.rb +4 -4
- data/lib/cloudcannon-jekyll/_cloudcannon/config-2.x.json +29 -36
- data/lib/cloudcannon-jekyll/_cloudcannon/config-3.0-4.x.json +29 -36
- data/lib/cloudcannon-jekyll/_cloudcannon/config.json +40 -44
- data/lib/cloudcannon-jekyll/_cloudcannon/details-2.x.json +14 -13
- data/lib/cloudcannon-jekyll/_cloudcannon/details-3.0-4.x.json +13 -12
- data/lib/cloudcannon-jekyll/_cloudcannon/details.json +13 -12
- data/lib/cloudcannon-jekyll/configuration.rb +2 -1
- data/lib/cloudcannon-jekyll/generator.rb +115 -15
- data/lib/cloudcannon-jekyll/jsonify-filter.rb +218 -0
- data/lib/cloudcannon-jekyll/page-without-a-file.rb +1 -0
- data/lib/cloudcannon-jekyll/reader.rb +38 -0
- data/lib/cloudcannon-jekyll/readers/data-reader.rb +18 -0
- data/lib/cloudcannon-jekyll/readers/old-data-reader.rb +55 -0
- data/lib/cloudcannon-jekyll/version.rb +1 -1
- data/script/ci-smoke-test +10 -0
- data/script/cibuild +1 -2
- data/script/test +1 -0
- metadata +27 -22
- data/lib/cloudcannon-jekyll/safe-jsonify-filter.rb +0 -210
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8469ad33191e42fbfa3e312dac3a38716024939bda6075fe140a2b0ee9ffaa8c
|
4
|
+
data.tar.gz: c8bbbfc8368845ea01036ae19df5469956489d5872a8ca2a465071a4c38b44f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b330dbb5b5e81875c25378e127ddb1696ecd6efb93e94f9b583c2c1d6885b773eb237597a227d4a1e2a19fb3c98d05c9da606e55c167cfdf170742886964633
|
7
|
+
data.tar.gz: eb8c85ac91e6c55fad55bd15e39c6e37093f267bad5e1e75e91667d529180d70b0c4a92ecf3ec0f4931cb7e27937481fcc30c31ee823f2fa3b56c29fd25d9a5b
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: Mark stale issues
|
2
|
+
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
- cron: "30 1 * * *"
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
stale:
|
9
|
+
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/stale@v1
|
14
|
+
with:
|
15
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
16
|
+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
|
17
|
+
stale-issue-label: 'no-issue-activity'
|
18
|
+
days-before-stale: 30
|
19
|
+
days-before-close: 5
|
data/.reek.yml
ADDED
data/.rubocop.yml
CHANGED
@@ -4,7 +4,7 @@ inherit_gem:
|
|
4
4
|
rubocop-jekyll: .rubocop.yml
|
5
5
|
|
6
6
|
AllCops:
|
7
|
-
TargetRubyVersion: 2.
|
7
|
+
TargetRubyVersion: 2.4
|
8
8
|
Include:
|
9
9
|
- lib/**/*.rb
|
10
10
|
|
@@ -20,8 +20,30 @@ AllCops:
|
|
20
20
|
- script/**/*
|
21
21
|
- vendor/**/*
|
22
22
|
- gemfiles/**/*
|
23
|
-
- lib/cloudcannon-jekyll/safe-jsonify-filter.rb # TODO remove this and fix warnings
|
24
23
|
|
25
24
|
Naming/MemoizedInstanceVariableName:
|
26
25
|
Exclude:
|
27
26
|
- lib/cloudcannon-jekyll/page-without-a-file.rb
|
27
|
+
|
28
|
+
Metrics/CyclomaticComplexity:
|
29
|
+
Exclude:
|
30
|
+
- lib/cloudcannon-jekyll/jsonify-filter.rb # TODO remove this and fix warnings
|
31
|
+
- lib/cloudcannon-jekyll/readers/old-data-reader.rb # TODO remove this and fix warnings
|
32
|
+
|
33
|
+
Metrics/PerceivedComplexity:
|
34
|
+
Exclude:
|
35
|
+
- lib/cloudcannon-jekyll/jsonify-filter.rb # TODO remove this and fix warnings
|
36
|
+
|
37
|
+
Metrics/AbcSize:
|
38
|
+
Exclude:
|
39
|
+
- lib/cloudcannon-jekyll/jsonify-filter.rb # TODO remove this and fix warnings
|
40
|
+
|
41
|
+
# This is excluded since the ruby target is 2.3.8 which doesn't support String.match?(Regexp)
|
42
|
+
Performance/RegexpMatch:
|
43
|
+
Exclude:
|
44
|
+
- lib/cloudcannon-jekyll/generator.rb
|
45
|
+
|
46
|
+
# This is excluded since Jekyll used this and we need to check for it
|
47
|
+
Lint/UnifiedInteger:
|
48
|
+
Exclude:
|
49
|
+
- lib/cloudcannon-jekyll/jsonify-filter.rb
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/HISTORY.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1
|
+
# 0.3.2
|
2
|
+
|
3
|
+
* Rework fallback for older versions of Jekyll when reading data, posts and drafts
|
4
|
+
* Fix deprecation warning for `posts.map`
|
5
|
+
|
6
|
+
# 0.3.1
|
7
|
+
|
8
|
+
* Fix for empty collection configurations
|
9
|
+
* Added max depth parameter for jsonify filter and increase it for array structures in config output
|
10
|
+
|
11
|
+
# 0.3.0
|
12
|
+
|
13
|
+
* Add empty paths.pages
|
14
|
+
* Added drafts to collections in details
|
15
|
+
* Added drafts and data to collections in config
|
16
|
+
* Added category folder drafts and posts to collections in config
|
17
|
+
* Added `_path` field to each collection definition in config
|
18
|
+
* Removed some unused fields
|
19
|
+
* Renamed static to static-pages in details and removed `robots.txt` and `sitemap.xml` exceptions
|
20
|
+
* Add `url` to static-pages
|
21
|
+
* Normalise `_path` in static-pages
|
22
|
+
|
23
|
+
# 0.2.2
|
24
|
+
|
25
|
+
* Added JSON handling for integers in hash keys
|
26
|
+
* Fix typo for collections key in older Jekyll versions
|
27
|
+
* Change date format to ISO8601
|
28
|
+
* Validate against new version of config schema
|
29
|
+
|
30
|
+
# 0.2.1
|
31
|
+
|
32
|
+
* Add gem information and time to output config file
|
33
|
+
* Fix missing in-place compact
|
34
|
+
* Fix source being output as full path on disk
|
35
|
+
* Read content for output config file directly from site config
|
36
|
+
|
37
|
+
# 0.2.0
|
38
|
+
|
39
|
+
* Add defaults and input-options keys to config output
|
40
|
+
* Add more ignore keys for legacy select data filter
|
41
|
+
* Reduce methods added from other plugins clashing
|
42
|
+
* Fix invalid output when unsupported class found
|
43
|
+
|
1
44
|
# 0.1.0
|
2
45
|
|
3
46
|
* Add output config file
|
data/cloudcannon-jekyll.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path("
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
|
6
6
|
require "cloudcannon-jekyll/version"
|
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_dependency "jekyll", ">= 2.4.0", "< 4"
|
23
23
|
|
24
|
+
spec.add_development_dependency "json_schemer", "~> 0.2.4"
|
24
25
|
spec.add_development_dependency "rake", "~> 13.0"
|
25
26
|
spec.add_development_dependency "rspec", "~> 3.9"
|
26
27
|
spec.add_development_dependency "rubocop", "~> 0.80"
|
27
28
|
spec.add_development_dependency "rubocop-jekyll", "~> 0.11"
|
28
|
-
spec.add_development_dependency "json_schemer", "~> 0.2.13"
|
29
29
|
end
|
data/lib/cloudcannon-jekyll.rb
CHANGED
@@ -5,14 +5,14 @@ require "jekyll"
|
|
5
5
|
require_relative "cloudcannon-jekyll/page-without-a-file"
|
6
6
|
require_relative "cloudcannon-jekyll/generator"
|
7
7
|
require_relative "cloudcannon-jekyll/configuration"
|
8
|
-
require_relative "cloudcannon-jekyll/
|
8
|
+
require_relative "cloudcannon-jekyll/jsonify-filter"
|
9
9
|
require_relative "cloudcannon-jekyll/version"
|
10
10
|
|
11
|
-
Liquid::Template.register_filter(CloudCannonJekyll::
|
11
|
+
Liquid::Template.register_filter(CloudCannonJekyll::JsonifyFilter)
|
12
12
|
|
13
|
-
|
14
|
-
if Jekyll::VERSION.start_with? "2"
|
13
|
+
if Jekyll::VERSION.start_with? "2."
|
15
14
|
module Jekyll
|
15
|
+
# Hooks didn't exist in Jekyll 2 so we monkey patch to get an :after_reset hook
|
16
16
|
class Site
|
17
17
|
alias_method :jekyll_reset, :reset
|
18
18
|
|
@@ -1,43 +1,36 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"collections": {
|
7
|
-
{% for collection in site.collections %}
|
8
|
-
"{{ collection[0] | xml_escape }}": {
|
9
|
-
"output": {{ collection[1].output | jsonify }},
|
10
|
-
"_sort-key": {{ collection[1]._sort_key | jsonify }},
|
11
|
-
"_subtext-key": {{ collection[1]._subtext_key | jsonify }},
|
12
|
-
"_image-key": {{ collection[1]._image_key | jsonify }},
|
13
|
-
"_image-size": {{ collection[1]._image_size | jsonify }},
|
14
|
-
"_singular-name": {{ collection[1]._singular_name | jsonify }},
|
15
|
-
"_singular-key": {{ collection[1]._singular_key | jsonify }},
|
16
|
-
"_disable-add": {{ collection[1]._disable_add | jsonify }},
|
17
|
-
"_icon": {{ collection[1]._icon | jsonify }},
|
18
|
-
"_add-options": {{ collection[1]._add_options | cc_safe_jsonify }}
|
19
|
-
}{% unless forloop.last %},{% endunless %}
|
20
|
-
{% endfor %}
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
|
+
"cloudcannon": {
|
4
|
+
"name": "cloudcannon-jekyll",
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
21
6
|
},
|
22
|
-
{% if
|
23
|
-
{
|
24
|
-
|
7
|
+
{% if config.timezone %}"timezone": {{ config.timezone | cc_jsonify }},{% endif %}
|
8
|
+
"include": {{ config.include | cc_jsonify }},
|
9
|
+
"exclude": {{ config.exclude | cc_jsonify }},
|
10
|
+
{% if config.baseurl %}"base-url": {{ config.baseurl | cc_jsonify }},{% endif %}
|
11
|
+
"collections": {{ collections | cc_jsonify: 'collections' }},
|
12
|
+
{% if config._comments %}"comments": {{ config._comments | cc_jsonify }},{% endif %}
|
13
|
+
{% if config._options %}"input-options": {{ config._options | cc_jsonify }},{% endif %}
|
14
|
+
{% if config.defaults %}"defaults": {{ config.defaults | cc_jsonify }},{% endif %}
|
15
|
+
{% if config._editor %}"editor": {
|
16
|
+
"default-path": {{ config._editor.default_path | cc_jsonify }}
|
25
17
|
},{% endif %}
|
26
|
-
{% if
|
27
|
-
"tab-size": {{
|
28
|
-
"show-gutter": {{
|
29
|
-
"theme": {{
|
18
|
+
{% if config._source_editor %}"source-editor": {
|
19
|
+
"tab-size": {{ config._source_editor.tab_size | cc_jsonify }},
|
20
|
+
"show-gutter": {{ config._source_editor.show_gutter | cc_jsonify }},
|
21
|
+
"theme": {{ config._source_editor.theme | cc_jsonify }}
|
30
22
|
},{% endif %}
|
31
|
-
{% if
|
23
|
+
{% if config._explore %}"explore": {{ config._explore | cc_jsonify }},{% endif %}
|
32
24
|
"paths": {
|
33
|
-
"uploads": {{
|
34
|
-
"plugins": {{
|
35
|
-
"data": {{
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
25
|
+
"uploads": {{ config.uploads_dir | cc_jsonify }},
|
26
|
+
"plugins": {{ config.plugins_dir | cc_jsonify }},
|
27
|
+
"data": {{ config.data_dir | cc_jsonify }},
|
28
|
+
"pages": "",
|
29
|
+
"collections": {{ config.collections_dir | cc_jsonify }},
|
30
|
+
"includes": {{ config.includes_dir | cc_jsonify }},
|
31
|
+
"layouts": {{ config.layouts_dir | cc_jsonify }}
|
39
32
|
},
|
40
|
-
{% if
|
41
|
-
{% assign select_data =
|
42
|
-
"source": {{
|
33
|
+
{% if config._array_structures %}"array-structures": {{ config._array_structures | cc_jsonify: nil, 20 }},{% endif %}
|
34
|
+
{% assign select_data = config | cc_select_data_jsonify %}{% if select_data %}"select-data": {{ select_data }},{% endif %}
|
35
|
+
"source": {{ config.source | replace: pwd, "" | cc_jsonify }}
|
43
36
|
}
|
@@ -1,43 +1,36 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
"
|
4
|
-
|
5
|
-
|
6
|
-
"collections": {
|
7
|
-
{% for collection in site.collections %}
|
8
|
-
"{{ collection.label | xml_escape }}": {
|
9
|
-
"output": {{ collection.output | jsonify }},
|
10
|
-
"_sort-key": {{ collection._sort_key | jsonify }},
|
11
|
-
"_subtext-key": {{ collection._subtext_key | jsonify }},
|
12
|
-
"_image-key": {{ collection._image_key | jsonify }},
|
13
|
-
"_image-size": {{ collection._image_size | jsonify }},
|
14
|
-
"_singular-name": {{ collection._singular_name | jsonify }},
|
15
|
-
"_singular-key": {{ collection._singular_key | jsonify }},
|
16
|
-
"_disable-add": {{ collection._disable_add | jsonify }},
|
17
|
-
"_icon": {{ collection._icon | jsonify }},
|
18
|
-
"_add-options": {{ collection._add_options | cc_safe_jsonify }}
|
19
|
-
}{% unless forloop.last %},{% endunless %}
|
20
|
-
{% endfor %}
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
|
+
"cloudcannon": {
|
4
|
+
"name": "cloudcannon-jekyll",
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
21
6
|
},
|
22
|
-
{% if
|
23
|
-
{
|
24
|
-
|
7
|
+
{% if config.timezone %}"timezone": {{ config.timezone | cc_jsonify }},{% endif %}
|
8
|
+
"include": {{ config.include | cc_jsonify }},
|
9
|
+
"exclude": {{ config.exclude | cc_jsonify }},
|
10
|
+
{% if config.baseurl %}"base-url": {{ config.baseurl | cc_jsonify }},{% endif %}
|
11
|
+
"collections": {{ collections | cc_jsonify: 'collections' }},
|
12
|
+
{% if config._comments %}"comments": {{ config._comments | cc_jsonify }},{% endif %}
|
13
|
+
{% if config._options %}"input-options": {{ config._options | cc_jsonify }},{% endif %}
|
14
|
+
{% if config.defaults %}"defaults": {{ config.defaults | cc_jsonify }},{% endif %}
|
15
|
+
{% if config._editor %}"editor": {
|
16
|
+
"default-path": {{ config._editor.default_path | cc_jsonify }}
|
25
17
|
},{% endif %}
|
26
|
-
{% if
|
27
|
-
"tab-size": {{
|
28
|
-
"show-gutter": {{
|
29
|
-
"theme": {{
|
18
|
+
{% if config._source_editor %}"source-editor": {
|
19
|
+
"tab-size": {{ config._source_editor.tab_size | cc_jsonify }},
|
20
|
+
"show-gutter": {{ config._source_editor.show_gutter | cc_jsonify }},
|
21
|
+
"theme": {{ config._source_editor.theme | cc_jsonify }}
|
30
22
|
},{% endif %}
|
31
|
-
{% if
|
23
|
+
{% if config._explore %}"explore": {{ config._explore | cc_jsonify }},{% endif %}
|
32
24
|
"paths": {
|
33
|
-
"uploads": {{
|
34
|
-
"plugins": {{
|
35
|
-
"data": {{
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
25
|
+
"uploads": {{ config.uploads_dir | cc_jsonify }},
|
26
|
+
"plugins": {{ config.plugins_dir | cc_jsonify }},
|
27
|
+
"data": {{ config.data_dir | cc_jsonify }},
|
28
|
+
"pages": "",
|
29
|
+
"collections": {{ config.collections_dir | cc_jsonify }},
|
30
|
+
"includes": {{ config.includes_dir | cc_jsonify }},
|
31
|
+
"layouts": {{ config.layouts_dir | cc_jsonify }}
|
39
32
|
},
|
40
|
-
{% if
|
41
|
-
{% assign select_data =
|
42
|
-
"source": {{
|
33
|
+
{% if config._array_structures %}"array-structures": {{ config._array_structures | cc_jsonify: nil, 20 }},{% endif %}
|
34
|
+
{% assign select_data = config | cc_select_data_jsonify %}{% if select_data %}"select-data": {{ select_data }},{% endif %}
|
35
|
+
"source": {{ config.source | replace: pwd, "" | cc_jsonify }}
|
43
36
|
}
|
@@ -1,61 +1,57 @@
|
|
1
1
|
{
|
2
|
-
{
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
"exclude": {{ site.exclude | jsonify }},
|
7
|
-
{% if site.baseurl -%}
|
8
|
-
"base-url": {{ site.baseurl | jsonify }},
|
9
|
-
{%- endif %}
|
10
|
-
"collections": {
|
11
|
-
{%- for collection in site.collections -%}
|
12
|
-
"{{ collection.label | xml_escape }}": {
|
13
|
-
"output": {{ collection.output | jsonify }},
|
14
|
-
"_sort-key": {{ collection._sort_key | jsonify }},
|
15
|
-
"_subtext-key": {{ collection._subtext_key | jsonify }},
|
16
|
-
"_image-key": {{ collection._image_key | jsonify }},
|
17
|
-
"_image-size": {{ collection._image_size | jsonify }},
|
18
|
-
"_singular-name": {{ collection._singular_name | jsonify }},
|
19
|
-
"_singular-key": {{ collection._singular_key | jsonify }},
|
20
|
-
"_disable-add": {{ collection._disable_add | jsonify }},
|
21
|
-
"_icon": {{ collection._icon | jsonify }},
|
22
|
-
"_add-options": {{ collection._add_options | cc_safe_jsonify }}
|
23
|
-
}
|
24
|
-
{%- unless forloop.last %},{% endunless %}
|
25
|
-
{%- endfor -%}
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
|
+
"cloudcannon": {
|
4
|
+
"name": "cloudcannon-jekyll",
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
26
6
|
},
|
27
|
-
{% if
|
28
|
-
"
|
7
|
+
{% if config.timezone -%}
|
8
|
+
"timezone": {{ config.timezone | cc_jsonify }},
|
29
9
|
{%- endif %}
|
30
|
-
{
|
10
|
+
"include": {{ config.include | cc_jsonify }},
|
11
|
+
"exclude": {{ config.exclude | cc_jsonify }},
|
12
|
+
{% if config.baseurl -%}
|
13
|
+
"base-url": {{ config.baseurl | cc_jsonify }},
|
14
|
+
{%- endif %}
|
15
|
+
"collections": {{ collections | cc_jsonify: 'collections' }},
|
16
|
+
{% if config._comments -%}
|
17
|
+
"comments": {{ config._comments | cc_jsonify }},
|
18
|
+
{%- endif %}
|
19
|
+
{% if config._options -%}
|
20
|
+
"input-options": {{ config._options | cc_jsonify }},
|
21
|
+
{%- endif %}
|
22
|
+
{% if config.defaults -%}
|
23
|
+
"defaults": {{ config.defaults | cc_jsonify }},
|
24
|
+
{%- endif %}
|
25
|
+
{% if config._editor -%}
|
31
26
|
"editor": {
|
32
|
-
"default-path": {{
|
27
|
+
"default-path": {{ config._editor.default_path | cc_jsonify }}
|
33
28
|
},
|
34
29
|
{%- endif %}
|
35
|
-
{% if
|
30
|
+
{% if config._source_editor -%}
|
36
31
|
"source-editor": {
|
37
|
-
"tab-size": {{
|
38
|
-
"show-gutter": {{
|
39
|
-
"theme": {{
|
32
|
+
"tab-size": {{ config._source_editor.tab_size | cc_jsonify }},
|
33
|
+
"show-gutter": {{ config._source_editor.show_gutter | cc_jsonify }},
|
34
|
+
"theme": {{ config._source_editor.theme | cc_jsonify }}
|
40
35
|
},
|
41
36
|
{%- endif %}
|
42
|
-
{% if
|
43
|
-
"explore": {{
|
37
|
+
{% if config._explore -%}
|
38
|
+
"explore": {{ config._explore | cc_jsonify }},
|
44
39
|
{%- endif %}
|
45
40
|
"paths": {
|
46
|
-
"uploads": {{
|
47
|
-
"plugins": {{
|
48
|
-
"data": {{
|
49
|
-
"
|
50
|
-
"
|
51
|
-
"
|
41
|
+
"uploads": {{ config.uploads_dir | cc_jsonify }},
|
42
|
+
"plugins": {{ config.plugins_dir | cc_jsonify }},
|
43
|
+
"data": {{ config.data_dir | cc_jsonify }},
|
44
|
+
"pages": "",
|
45
|
+
"collections": {{ config.collections_dir | cc_jsonify }},
|
46
|
+
"includes": {{ config.includes_dir | cc_jsonify }},
|
47
|
+
"layouts": {{ config.layouts_dir | cc_jsonify }}
|
52
48
|
},
|
53
|
-
{% if
|
54
|
-
"array-structures": {{
|
49
|
+
{% if config._array_structures -%}
|
50
|
+
"array-structures": {{ config._array_structures | cc_jsonify: nil, 20 }},
|
55
51
|
{%- endif %}
|
56
|
-
{% assign select_data =
|
52
|
+
{% assign select_data = config | cc_select_data_jsonify -%}
|
57
53
|
{% if select_data -%}
|
58
54
|
"select-data": {{ select_data }},
|
59
55
|
{%- endif %}
|
60
|
-
"source": {{
|
56
|
+
"source": {{ config.source | replace: pwd, "" | cc_jsonify }}
|
61
57
|
}
|
@@ -1,27 +1,28 @@
|
|
1
1
|
{
|
2
|
-
"time": {{ site.time |
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
3
|
"cloudcannon": {
|
4
4
|
"name": "cloudcannon-jekyll",
|
5
|
-
"version": {{ gem_version |
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
6
6
|
},
|
7
7
|
"generator": {
|
8
8
|
"name": "jekyll",
|
9
|
-
"version": {{ jekyll.version |
|
10
|
-
"environment": {{ jekyll.env |
|
9
|
+
"version": {{ jekyll.version | cc_jsonify }},
|
10
|
+
"environment": {{ jekyll.env | cc_jsonify }},
|
11
11
|
"metadata": {
|
12
|
-
"markdown": {{ site.markdown |
|
13
|
-
"kramdown": {{ site.kramdown |
|
14
|
-
"commonmark": {{ site.commonmark |
|
12
|
+
"markdown": {{ site.markdown | cc_jsonify }},
|
13
|
+
"kramdown": {{ site.kramdown | cc_jsonify }},
|
14
|
+
"commonmark": {{ site.commonmark | cc_jsonify }}
|
15
15
|
}
|
16
16
|
},{% if site.cloudcannon.data.first %}{% assign data_seen = false %}
|
17
17
|
"data": {
|
18
|
-
{% for data in site.data %}{% assign key = data[0] %}{% if site.cloudcannon.data[key] %}{% if data_seen %},{% endif %}{{ data[0] |
|
19
|
-
{% elsif site.cloudcannon.data %}"data": {{ site.data |
|
18
|
+
{% 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 %}},
|
19
|
+
{% elsif site.cloudcannon.data %}"data": {{ site.data | cc_jsonify }},{% endif %}
|
20
20
|
"collections": {
|
21
|
-
"
|
22
|
-
|
21
|
+
"drafts": {{ drafts | cc_jsonify }},
|
22
|
+
"posts": {{ site.posts | reverse | cc_jsonify }}{% if site.collections.size > 0 %},{% endif %}
|
23
|
+
{% for collection in site.collections %}"{{ collection[0] | xml_escape }}": {{ collection[1].docs | cc_jsonify }}{% unless forloop.last %},{% endunless %}
|
23
24
|
{% endfor %}
|
24
25
|
},
|
25
|
-
"pages": {{ site.pages |
|
26
|
-
"static": {{ site.static_files | cc_static_files_jsonify }}
|
26
|
+
"pages": {{ site.pages | cc_jsonify }},
|
27
|
+
"static-pages": {{ site.static_files | cc_static_files_jsonify }}
|
27
28
|
}
|