cloudcannon-jekyll 0.0.8 → 0.3.1
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/.gitignore +1 -0
- data/.reek.yml +6 -0
- data/.rubocop.yml +24 -2
- data/.travis.yml +2 -1
- data/Gemfile +2 -0
- data/HISTORY.md +45 -0
- data/cloudcannon-jekyll.gemspec +5 -4
- data/lib/cloudcannon-jekyll.rb +4 -4
- data/lib/cloudcannon-jekyll/_cloudcannon/config-2.x.json +36 -0
- data/lib/cloudcannon-jekyll/_cloudcannon/config-3.0-4.x.json +36 -0
- data/lib/cloudcannon-jekyll/_cloudcannon/config.json +57 -0
- data/lib/cloudcannon-jekyll/_cloudcannon/details-2.x.json +16 -13
- data/lib/cloudcannon-jekyll/_cloudcannon/details-3.0-4.x.json +27 -0
- data/lib/cloudcannon-jekyll/_cloudcannon/details.json +28 -15
- data/lib/cloudcannon-jekyll/configuration.rb +2 -1
- data/lib/cloudcannon-jekyll/generator.rb +131 -18
- 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 +44 -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/release +4 -2
- data/script/test +1 -0
- metadata +32 -10
- data/lib/cloudcannon-jekyll/_cloudcannon/details-3.0.x.json +0 -24
- data/lib/cloudcannon-jekyll/safe-jsonify-filter.rb +0 -170
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83d8c10e1f93435eb7f8cf67d63b3cf94c35ca24a4f6b02de64c11925f829213
|
4
|
+
data.tar.gz: 178b75ec1c4984773ef897967e7973997811806237deefeca61dc906ab7a1bc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d38402f61598857b9b6dba32c67d1ca44dd575dd93591a4944af0bd52bc5fb322cb5b2c9013c534a6031bed72d17583288f699bfb92c1853182b1bf4152c48be
|
7
|
+
data.tar.gz: 6a79c497b8718283e72d65a8b415d77808470777df547701a30f1f564fb5d5b73e20e5ba7be17868b542ab79cc16791f3cfd556e6fa20d5dde75031d52b62e66
|
@@ -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/.gitignore
CHANGED
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,48 @@
|
|
1
|
+
# 0.3.1
|
2
|
+
|
3
|
+
* Fix for empty collection configurations
|
4
|
+
|
5
|
+
# 0.3.0
|
6
|
+
|
7
|
+
* Add empty paths.pages
|
8
|
+
* Added drafts to collections in details
|
9
|
+
* Added drafts and data to collections in config
|
10
|
+
* Added category folder drafts and posts to collections in config
|
11
|
+
* Added `_path` field to each collection definition in config
|
12
|
+
* Removed some unused fields
|
13
|
+
* Renamed static to static-pages in details and removed `robots.txt` and `sitemap.xml` exceptions
|
14
|
+
* Add `url` to static-pages
|
15
|
+
* Normalise `_path` in static-pages
|
16
|
+
* Added max depth parameter for jsonify filter and increase it for array structures in config output
|
17
|
+
|
18
|
+
# 0.2.2
|
19
|
+
|
20
|
+
* Added JSON handling for integers in hash keys
|
21
|
+
* Fix typo for collections key in older Jekyll versions
|
22
|
+
* Change date format to ISO8601
|
23
|
+
* Validate against new version of config schema
|
24
|
+
|
25
|
+
# 0.2.1
|
26
|
+
|
27
|
+
* Add gem information and time to output config file
|
28
|
+
* Fix missing in-place compact
|
29
|
+
* Fix source being output as full path on disk
|
30
|
+
* Read content for output config file directly from site config
|
31
|
+
|
32
|
+
# 0.2.0
|
33
|
+
|
34
|
+
* Add defaults and input-options keys to config output
|
35
|
+
* Add more ignore keys for legacy select data filter
|
36
|
+
* Reduce methods added from other plugins clashing
|
37
|
+
* Fix invalid output when unsupported class found
|
38
|
+
|
39
|
+
# 0.1.0
|
40
|
+
|
41
|
+
* Add output config file
|
42
|
+
* Add support for including only specified `data` keys
|
43
|
+
* Fix invalid JSON issue for sites built with Jekyll 2 and no collections
|
44
|
+
* Change module load style for easier dropping into _plugins
|
45
|
+
|
1
46
|
# 0.0.8
|
2
47
|
|
3
48
|
* Removed unsupported Jekyll test targets
|
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,8 +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
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
27
|
-
spec.add_development_dependency "rubocop-jekyll", "~> 0.
|
27
|
+
spec.add_development_dependency "rubocop", "~> 0.80"
|
28
|
+
spec.add_development_dependency "rubocop-jekyll", "~> 0.11"
|
28
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
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
|
+
"cloudcannon": {
|
4
|
+
"name": "cloudcannon-jekyll",
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
6
|
+
},
|
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 }}
|
17
|
+
},{% endif %}
|
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 }}
|
22
|
+
},{% endif %}
|
23
|
+
{% if config._explore %}"explore": {{ config._explore | cc_jsonify }},{% endif %}
|
24
|
+
"paths": {
|
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 }}
|
32
|
+
},
|
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 }}
|
36
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
|
+
"cloudcannon": {
|
4
|
+
"name": "cloudcannon-jekyll",
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
6
|
+
},
|
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 }}
|
17
|
+
},{% endif %}
|
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 }}
|
22
|
+
},{% endif %}
|
23
|
+
{% if config._explore %}"explore": {{ config._explore | cc_jsonify }},{% endif %}
|
24
|
+
"paths": {
|
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 }}
|
32
|
+
},
|
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 }}
|
36
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
{
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
|
+
"cloudcannon": {
|
4
|
+
"name": "cloudcannon-jekyll",
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
6
|
+
},
|
7
|
+
{% if config.timezone -%}
|
8
|
+
"timezone": {{ config.timezone | cc_jsonify }},
|
9
|
+
{%- endif %}
|
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 -%}
|
26
|
+
"editor": {
|
27
|
+
"default-path": {{ config._editor.default_path | cc_jsonify }}
|
28
|
+
},
|
29
|
+
{%- endif %}
|
30
|
+
{% if config._source_editor -%}
|
31
|
+
"source-editor": {
|
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 }}
|
35
|
+
},
|
36
|
+
{%- endif %}
|
37
|
+
{% if config._explore -%}
|
38
|
+
"explore": {{ config._explore | cc_jsonify }},
|
39
|
+
{%- endif %}
|
40
|
+
"paths": {
|
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 }}
|
48
|
+
},
|
49
|
+
{% if config._array_structures -%}
|
50
|
+
"array-structures": {{ config._array_structures | cc_jsonify: nil, 20 }},
|
51
|
+
{%- endif %}
|
52
|
+
{% assign select_data = config | cc_select_data_jsonify -%}
|
53
|
+
{% if select_data -%}
|
54
|
+
"select-data": {{ select_data }},
|
55
|
+
{%- endif %}
|
56
|
+
"source": {{ config.source | replace: pwd, "" | cc_jsonify }}
|
57
|
+
}
|
@@ -1,25 +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
|
-
},{% if site.cloudcannon.data %}
|
17
|
-
"data": {
|
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_jsonify }}: {{ data[1] | cc_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
|
19
|
+
{% elsif site.cloudcannon.data %}"data": {{ site.data | cc_jsonify }},{% endif %}
|
18
20
|
"collections": {
|
19
|
-
"
|
20
|
-
|
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 %}
|
21
24
|
{% endfor %}
|
22
25
|
},
|
23
|
-
"pages": {{ site.pages |
|
24
|
-
"static": {{ site.static_files | cc_static_files_jsonify }}
|
26
|
+
"pages": {{ site.pages | cc_jsonify }},
|
27
|
+
"static-pages": {{ site.static_files | cc_static_files_jsonify }}
|
25
28
|
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"time": {{ site.time | date_to_xmlschema | cc_jsonify }},
|
3
|
+
"cloudcannon": {
|
4
|
+
"name": "cloudcannon-jekyll",
|
5
|
+
"version": {{ gem_version | cc_jsonify }}
|
6
|
+
},
|
7
|
+
"generator": {
|
8
|
+
"name": "jekyll",
|
9
|
+
"version": {{ jekyll.version | cc_jsonify }},
|
10
|
+
"environment": {{ jekyll.env | cc_jsonify }},
|
11
|
+
"metadata": {
|
12
|
+
"markdown": {{ site.markdown | cc_jsonify }},
|
13
|
+
"kramdown": {{ site.kramdown | cc_jsonify }},
|
14
|
+
"commonmark": {{ site.commonmark | cc_jsonify }}
|
15
|
+
}
|
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_jsonify }}: {{ data[1] | cc_jsonify }}{% assign data_seen = true %}{% endif %}{% endfor %}},
|
19
|
+
{% elsif site.cloudcannon.data %}"data": {{ site.data | cc_jsonify }},{% endif %}
|
20
|
+
"collections": {
|
21
|
+
"drafts": {{ drafts | cc_jsonify }}{% if site.collections.size > 0 %},{% endif %}
|
22
|
+
{% for collection in site.collections %}"{{ collection.label | xml_escape }}": {{ collection.docs | cc_jsonify }}{% unless forloop.last %},{% endunless %}
|
23
|
+
{% endfor %}
|
24
|
+
},
|
25
|
+
"pages": {{ site.pages | cc_jsonify }},
|
26
|
+
"static-pages": {{ site.static_files | cc_static_files_jsonify }}
|
27
|
+
}
|
@@ -1,28 +1,41 @@
|
|
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
|
},
|
17
|
-
{
|
18
|
-
"data": {
|
19
|
-
|
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_jsonify }}: {{ data[1] | cc_jsonify }}
|
25
|
+
{%- assign data_seen = true %}
|
26
|
+
{%- endif %}
|
27
|
+
{%- endfor -%}
|
28
|
+
},
|
29
|
+
{% elsif site.cloudcannon.data -%}
|
30
|
+
"data": {{ site.data | cc_jsonify }},
|
31
|
+
{%- endif %}
|
20
32
|
"collections": {
|
21
|
-
{
|
22
|
-
|
33
|
+
"drafts": {{ drafts | cc_jsonify }}{% if site.collections.size > 0 %},{% endif %}
|
34
|
+
{%- for collection in site.collections -%}
|
35
|
+
"{{ collection.label | xml_escape }}": {{ collection.docs | cc_jsonify }}
|
23
36
|
{%- unless forloop.last %},{% endunless %}
|
24
|
-
{%- endfor
|
37
|
+
{%- endfor -%}
|
25
38
|
},
|
26
|
-
"pages": {{ site.pages |
|
27
|
-
"static": {{ site.static_files | cc_static_files_jsonify }}
|
39
|
+
"pages": {{ site.pages | cc_jsonify }},
|
40
|
+
"static-pages": {{ site.static_files | cc_static_files_jsonify }}
|
28
41
|
}
|