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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9af7a56d0f7ae1c2fbf46678eef968a8ea4d906a88394b2704093b8d6a375017
4
- data.tar.gz: ed492b3cc15a707238dc083be5063c20f7e9c6664fb545f8e4fc7bed54c90b05
3
+ metadata.gz: 8469ad33191e42fbfa3e312dac3a38716024939bda6075fe140a2b0ee9ffaa8c
4
+ data.tar.gz: c8bbbfc8368845ea01036ae19df5469956489d5872a8ca2a465071a4c38b44f1
5
5
  SHA512:
6
- metadata.gz: a38d6d1a314062fe832fed516f188da8d0a299f0e8a41e3701b1cf1166d50b88a5ef34a1828eec093993803be5c8ac21937da77b876d6f0840610e28ac7593fd
7
- data.tar.gz: b49cec3b53386c5422cffc485d610d386c0cb692078890abf1b030f764afc55b3329d5ebe53c28815a73d5b2e55bcb7127d02945cb16d230e03ef7cdefc5e031
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
@@ -0,0 +1,6 @@
1
+ detectors:
2
+ LongParameterList:
3
+ max_params: 4 # Matches the Rubocop setting
4
+
5
+ exclude_paths:
6
+ - spec
@@ -4,7 +4,7 @@ inherit_gem:
4
4
  rubocop-jekyll: .rubocop.yml
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 2.6
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
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
- - 2.6
4
+ - 2.3.8
5
5
 
6
6
  before_install:
7
7
  - gem update --system
@@ -15,3 +15,4 @@ env:
15
15
  matrix:
16
16
  - JEKYLL_VERSION="2.4.0"
17
17
  - JEKYLL_VERSION="3.0.0"
18
+ - JEKYLL_VERSION="3.2.1"
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  gemspec
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
@@ -1,6 +1,6 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path("../lib", __FILE__)
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
@@ -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/safe-jsonify-filter"
8
+ require_relative "cloudcannon-jekyll/jsonify-filter"
9
9
  require_relative "cloudcannon-jekyll/version"
10
10
 
11
- Liquid::Template.register_filter(CloudCannonJekyll::SafeJsonifyFilter)
11
+ Liquid::Template.register_filter(CloudCannonJekyll::JsonifyFilter)
12
12
 
13
- # Hooks didn't exist in Jekyll 2 so we monkey patch to get an :after_reset hook
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
- {% if site.timezone %}"timezone": {{ site.timezone | jsonify }},{% endif %}
3
- "include": {{ site.include | jsonify }},
4
- "exclude": {{ site.exclude | jsonify }},
5
- {% if site.baseurl %}"base-url": {{ site.baseurl | jsonify }},{% endif %}
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 site._comments %}"comments": {{ site._comments | cc_safe_jsonify }},{% endif %}
23
- {% if site._editor %}"editor": {
24
- "default-path": {{ site._editor.default_path | jsonify }}
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 site._source_editor %}"source-editor": {
27
- "tab-size": {{ site._source_editor.tab_size | jsonify }},
28
- "show-gutter": {{ site._source_editor.show_gutter | jsonify }},
29
- "theme": {{ site._source_editor.theme | jsonify }}
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 site._explore %}"explore": {{ site._explore | cc_safe_jsonify }},{% endif %}
23
+ {% if config._explore %}"explore": {{ config._explore | cc_jsonify }},{% endif %}
32
24
  "paths": {
33
- "uploads": {{ site.uploads_dir | jsonify }},
34
- "plugins": {{ site.plugins_dir | jsonify }},
35
- "data": {{ site.data_dir | jsonify }},
36
- "collections": {{ site.collections_dir | jsonify }},
37
- "includes": {{ site.includes_dir | jsonify }},
38
- "layouts": {{ site.layouts_dir | jsonify }}
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 site._array_structures %}"array-structures": {{ site._array_structures | cc_safe_jsonify }},{% endif %}
41
- {% assign select_data = site | cc_site_select_data_jsonify %}{% if select_data %}"select-data": {{ select_data }},{% endif %}
42
- "source": {{ site.source | jsonify }}
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
- {% if site.timezone %}"timezone": {{ site.timezone | jsonify }},{% endif %}
3
- "include": {{ site.include | jsonify }},
4
- "exclude": {{ site.exclude | jsonify }},
5
- {% if site.baseurl %}"base-url": {{ site.baseurl | jsonify }},{% endif %}
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 site._comments %}"comments": {{ site._comments | cc_safe_jsonify }},{% endif %}
23
- {% if site._editor %}"editor": {
24
- "default-path": {{ site._editor.default_path | jsonify }}
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 site._source_editor %}"source-editor": {
27
- "tab-size": {{ site._source_editor.tab_size | jsonify }},
28
- "show-gutter": {{ site._source_editor.show_gutter | jsonify }},
29
- "theme": {{ site._source_editor.theme | jsonify }}
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 site._explore %}"explore": {{ site._explore | cc_safe_jsonify }},{% endif %}
23
+ {% if config._explore %}"explore": {{ config._explore | cc_jsonify }},{% endif %}
32
24
  "paths": {
33
- "uploads": {{ site.uploads_dir | jsonify }},
34
- "plugins": {{ site.plugins_dir | jsonify }},
35
- "data": {{ site.data_dir | jsonify }},
36
- "collections": {{ site.collections_dir | jsonify }},
37
- "includes": {{ site.includes_dir | jsonify }},
38
- "layouts": {{ site.layouts_dir | jsonify }}
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 site._array_structures %}"array-structures": {{ site._array_structures | cc_safe_jsonify }},{% endif %}
41
- {% assign select_data = site | cc_site_select_data_jsonify %}{% if select_data %}"select-data": {{ select_data }},{% endif %}
42
- "source": {{ site.source | jsonify }}
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
- {% if site.timezone -%}
3
- "timezone": {{ site.timezone | jsonify }},
4
- {%- endif %}
5
- "include": {{ site.include | jsonify }},
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 site._comments -%}
28
- "comments": {{ site._comments | cc_safe_jsonify }},
7
+ {% if config.timezone -%}
8
+ "timezone": {{ config.timezone | cc_jsonify }},
29
9
  {%- endif %}
30
- {% if site._editor -%}
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": {{ site._editor.default_path | jsonify }}
27
+ "default-path": {{ config._editor.default_path | cc_jsonify }}
33
28
  },
34
29
  {%- endif %}
35
- {% if site._source_editor -%}
30
+ {% if config._source_editor -%}
36
31
  "source-editor": {
37
- "tab-size": {{ site._source_editor.tab_size | jsonify }},
38
- "show-gutter": {{ site._source_editor.show_gutter | jsonify }},
39
- "theme": {{ site._source_editor.theme | jsonify }}
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 site._explore -%}
43
- "explore": {{ site._explore | cc_safe_jsonify }},
37
+ {% if config._explore -%}
38
+ "explore": {{ config._explore | cc_jsonify }},
44
39
  {%- endif %}
45
40
  "paths": {
46
- "uploads": {{ site.uploads_dir | jsonify }},
47
- "plugins": {{ site.plugins_dir | jsonify }},
48
- "data": {{ site.data_dir | jsonify }},
49
- "collections": {{ site.collections_dir | jsonify }},
50
- "includes": {{ site.includes_dir | jsonify }},
51
- "layouts": {{ site.layouts_dir | jsonify }}
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 site._array_structures -%}
54
- "array-structures": {{ site._array_structures | cc_safe_jsonify }},
49
+ {% if config._array_structures -%}
50
+ "array-structures": {{ config._array_structures | cc_jsonify: nil, 20 }},
55
51
  {%- endif %}
56
- {% assign select_data = site | cc_site_select_data_jsonify -%}
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": {{ site.source | jsonify }}
56
+ "source": {{ config.source | replace: pwd, "" | cc_jsonify }}
61
57
  }
@@ -1,27 +1,28 @@
1
1
  {
2
- "time": {{ site.time | jsonify }},
2
+ "time": {{ site.time | date_to_xmlschema | cc_jsonify }},
3
3
  "cloudcannon": {
4
4
  "name": "cloudcannon-jekyll",
5
- "version": {{ gem_version | jsonify }}
5
+ "version": {{ gem_version | cc_jsonify }}
6
6
  },
7
7
  "generator": {
8
8
  "name": "jekyll",
9
- "version": {{ jekyll.version | jsonify }},
10
- "environment": {{ jekyll.env | jsonify }},
9
+ "version": {{ jekyll.version | cc_jsonify }},
10
+ "environment": {{ jekyll.env | cc_jsonify }},
11
11
  "metadata": {
12
- "markdown": {{ site.markdown | cc_safe_jsonify }},
13
- "kramdown": {{ site.kramdown | cc_safe_jsonify }},
14
- "commonmark": {{ site.commonmark | cc_safe_jsonify }}
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] | 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
+ {% 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
- "posts": {{ site.posts | reverse | cc_safe_jsonify }}{% if site.collections.size > 0 %},{% endif %}
22
- {% for collection in site.collections %}"{{ collection[0] | xml_escape }}": {{ collection[1].docs | cc_safe_jsonify }}{% unless forloop.last %},{% endunless %}
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 | cc_safe_jsonify }},
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
  }