jekyll-open-sdg-plugins 1.7.0 → 1.8.0.pre.beta1

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: 3a89cf02d816079a37d7a46f926a77b8e084ea6521b9a8dbe2a6616b8fbddb0f
4
- data.tar.gz: 62d0c38503090c81c54e7d15bc32dbf50f87b9257f659829bf98b2c6a4658e67
3
+ metadata.gz: 1f1c5e450726f3057d398f010f245835b9359d35cac156120a3c71f387f223c4
4
+ data.tar.gz: 5f70b71c0816d0397542e889f45dea97476e50a42807599b7b01a5cb8d5ac61f
5
5
  SHA512:
6
- metadata.gz: a289cf63df4aae969859ef27dfcb357a56286c1fcbb81598332ff9ad20eea765f62b87e7e03eb60682852b8fca3055a8dc18956a45112843c4bd1dc1a12ef323
7
- data.tar.gz: 32c575404cddbc955955ce28845853424580f639c8d8cfa003e83f43e9d6a42d048219273e6f367234391f5e23e14a75d575d9e21bf4e7f941a34ea87f9573f8
6
+ metadata.gz: f83ac6d95f7350a9b96286ae1fe2b8437f0ee4cb8444eee3b6f5a84bf3b8a002e3ec818764fd4f16ccfb53079047b049cbd5af4506b1346dcc161d2f78f4b616
7
+ data.tar.gz: 10b83b693065ecf4c70992067c6f922e9c06dd2302ff6593d89ad179edfb5fd3e89328f285ac94e21185062d7fb05f91a89aa624240a54391551f7966afb7f5c
@@ -59,6 +59,39 @@ module JekyllOpenSdgPlugins
59
59
  add_translation_keys(goal['statuses'], site)
60
60
  end
61
61
  end
62
+
63
+ # Print warnings for settings that are deprecated
64
+ # and will be removed in version 2.0.0.
65
+ if !site.config.has_key?('accessible_charts') || !site.config['accessible_charts']
66
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the accessible_charts setting will be automatically set to true.')
67
+ end
68
+ if !site.config.has_key?('accessible_tabs') || !site.config['accessible_tabs']
69
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the accessible_tabs setting will be automatically set to true.')
70
+ end
71
+ if !site.config.has_key?('contrast_type') || site.config['contrast_type'] != 'single'
72
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the contrast_type setting will be automatically set to "single".')
73
+ end
74
+ if site.config.has_key?('create_goals') && site.config['create_goals']['layout'] != 'goal-with-progress'
75
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the create_goals.layout setting will be removed, because there will only be a single option for goal layouts. To see a preview, set "bootstrap_5" to "true".')
76
+ end
77
+ if !site.config.has_key?('favicons') || site.config['favicons'] != 'favicon.io'
78
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the favicons setting will be automatically set to "favicon.io".')
79
+ end
80
+ if site.config.has_key?('frontpage_heading') && site.config['frontpage_heading'] != ''
81
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the "frontpage_heading" setting will no longer be used.')
82
+ end
83
+ if site.config.has_key?('frontpage_instructions') && site.config['frontpage_instructions'] != ''
84
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the "frontpage_instructions" setting will no longer be used.')
85
+ end
86
+ if site.config.has_key?('header') && site.config['header']['include'] != 'header-menu-left-aligned.html'
87
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the "header.include" setting will no longer be used because there will only be a single option for headers. To see what this will look like, set "bootstrap_5" to "true".')
88
+ end
89
+ if site.config.has_key?('non_global_metadata') && site.config['non_global_metadata'] != ''
90
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the "non_global_metadata" setting will be removed. Please use the "metadata_tabs" setting to control the labels of the metadata tabs.')
91
+ end
92
+ if !site.config.has_key?('series_toggle') || !site.config['series_toggle']
93
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the "series_toggle" will be automatically set to "true". In order to keep the "false" behavior, please rename your "Series" column to something else.')
94
+ end
62
95
  end
63
96
  end
64
97
  end
@@ -78,6 +78,9 @@ module JekyllOpenSdgPlugins
78
78
  self.data['goal_number'] = goal.to_s
79
79
  self.data['language'] = language
80
80
  self.data['layout'] = layout
81
+ if site.config['bootstrap_5']
82
+ self.data['layout'] = 'goal-bootstrap5'
83
+ end
81
84
  # Backwards compatibility:
82
85
  self.data['sdg_goal'] = self.data['goal_number']
83
86
  end
@@ -158,6 +158,9 @@ module JekyllOpenSdgPlugins
158
158
  self.data = {}
159
159
  self.data['indicator_number'] = inid.gsub('-', '.')
160
160
  self.data['layout'] = layout
161
+ if site.config['bootstrap_5']
162
+ self.data['layout'] = 'indicator-bootstrap5'
163
+ end
161
164
  self.data['language'] = language
162
165
  # Backwards compatibility:
163
166
  self.data['indicator'] = self.data['indicator_number']
@@ -61,6 +61,12 @@ module JekyllOpenSdgPlugins
61
61
  pages = site.config['create_pages']
62
62
  end
63
63
 
64
+ pages.each do |page|
65
+ if page['layout'] == 'frontpage'
66
+ opensdg_notice('DEPRECATION NOTICE: In Open SDG 2.0.0, the "frontpage" layout will change. To see a preview, set "bootstrap_5" to "true".')
67
+ end
68
+ end
69
+
64
70
  # Clone pages so that we don't edit the original.
65
71
  pages = pages.clone
66
72
 
@@ -130,6 +136,15 @@ module JekyllOpenSdgPlugins
130
136
  self.data[key] = value
131
137
  end
132
138
  end
139
+
140
+ if site.config['bootstrap_5']
141
+ if page.has_key?('layout') && page['layout'] == 'reportingstatus'
142
+ self.data['layout'] = 'reportingstatus-bootstrap5'
143
+ end
144
+ if page.has_key?('layout') && page['layout'] == 'frontpage'
145
+ self.data['layout'] = 'frontpage-alt'
146
+ end
147
+ end
133
148
  end
134
149
  end
135
150
  end
@@ -56,6 +56,18 @@
56
56
  }
57
57
  ]
58
58
  },
59
+ "bootstrap_5": {
60
+ "title": "Bootstrap 5",
61
+ "type": "boolean",
62
+ "description": "This setting can be set to `true` to enable Bootstrap 5. Importantly, this will automatically be set to 'true' in Open SDG 2.0.0.",
63
+ "format": "checkbox",
64
+ "links": [
65
+ {
66
+ "rel": "More information on the bootstrap_5 setting",
67
+ "href": "https://open-sdg.readthedocs.io/en/latest/configuration/#bootstrap_5"
68
+ }
69
+ ]
70
+ },
59
71
  "breadcrumbs": {
60
72
  "options": {"collapsed": true},
61
73
  "type": "object",
@@ -97,6 +109,18 @@
97
109
  }
98
110
  ]
99
111
  },
112
+ "chartjs_3": {
113
+ "title": "Chart.js 3",
114
+ "type": "boolean",
115
+ "description": "This setting can be set to `true` to enable Chart.js 3. Importantly, this will automatically be set to 'true' in Open SDG 2.0.0.",
116
+ "format": "checkbox",
117
+ "links": [
118
+ {
119
+ "rel": "More information on the chartjs_3 setting",
120
+ "href": "https://open-sdg.readthedocs.io/en/latest/configuration/#chartjs_3"
121
+ }
122
+ ]
123
+ },
100
124
  "contrast_type": {
101
125
  "type": "string",
102
126
  "title": "Contrast type",
@@ -414,6 +438,12 @@
414
438
  "type": "string",
415
439
  "title": "Message",
416
440
  "description": "A short disclaimer message."
441
+ },
442
+ "hidden": {
443
+ "type": "boolean",
444
+ "title": "Hidden",
445
+ "description": "Hide the disclaimer.",
446
+ "format": "checkbox"
417
447
  }
418
448
  },
419
449
  "links": [
@@ -1462,6 +1492,36 @@
1462
1492
  "description": "Configuration of the site configuration form.",
1463
1493
  "$ref": "#/definitions/config_form_options"
1464
1494
  },
1495
+ "time_series_attributes": {
1496
+ "options": {"collapsed": true},
1497
+ "type": "array",
1498
+ "title": "Time-series attributes",
1499
+ "description": "This setting can be used to specify data columns to be considered 'time-series attributes' and displayed in the footer.",
1500
+ "items": {
1501
+ "type": "object",
1502
+ "title": "Time-series attribute",
1503
+ "properties": {
1504
+ "field": {
1505
+ "type": "string",
1506
+ "minLength": 1,
1507
+ "title": "Field",
1508
+ "description": "Column name in the data."
1509
+ },
1510
+ "label": {
1511
+ "type": "string",
1512
+ "minLength": 1,
1513
+ "title": "Label",
1514
+ "description": "Label when displayed in the footer."
1515
+ }
1516
+ }
1517
+ },
1518
+ "links": [
1519
+ {
1520
+ "rel": "More information on the time series attributes setting",
1521
+ "href": "https://open-sdg.readthedocs.io/en/latest/configuration/#time_series_attributes"
1522
+ }
1523
+ ]
1524
+ },
1465
1525
  "validate_indicator_config": {
1466
1526
  "title": "Validate indicator config",
1467
1527
  "type": "boolean",
@@ -61,6 +61,20 @@ module JekyllOpenSdgPlugins
61
61
  'label' => 'status.disaggregation_status_notapplicable',
62
62
  },
63
63
  ]
64
+
65
+ # Provide some defaults.
66
+ if !site.config.has_key?('time_series_attributes') or site.config['time_series_attributes'].length == 0
67
+ site.config['time_series_attributes'] = [
68
+ {
69
+ 'field' => 'COMMENT_TS',
70
+ 'label' => 'indicator.footnote',
71
+ },
72
+ {
73
+ 'field' => 'DATA_LAST_UPDATE',
74
+ 'label' => 'metadata_fields.national_data_update_url'
75
+ },
76
+ ]
77
+ end
64
78
  end
65
79
 
66
80
  # Copy properties from a hash onto another hash.
@@ -1,3 +1,3 @@
1
1
  module JekyllOpenSdgPlugins
2
- VERSION = "1.7.0".freeze
2
+ VERSION = "1.8.0-beta1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-open-sdg-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0.pre.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brock Fanning
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-13 00:00:00.000000000 Z
11
+ date: 2022-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -102,9 +102,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - ">="
105
+ - - ">"
106
106
  - !ruby/object:Gem::Version
107
- version: '0'
107
+ version: 1.3.1
108
108
  requirements: []
109
109
  rubygems_version: 3.0.9
110
110
  signing_key: