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

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a20f18058cd335bd8013c7ee57b71e24a89d58233b41a40bb1b9b68935808181
4
- data.tar.gz: 7500171f49b24af2713419835bddabdb4818a191db2543f5a4f9dc3c71c8790b
3
+ metadata.gz: 8a8c796bf7b90b41f1d9258be2f52a3cb3fb80604ca580ef592cf5bf7a7acf59
4
+ data.tar.gz: 961d18d17a15e41591547046e76fcf48e6c12ea226dfcee8c9378be019ccdb00
5
5
  SHA512:
6
- metadata.gz: 2aa09b75a8c255eede956558d0f70b1bfaab9ec6cf48d823ed75c8414d66d9e55e52bef746ddbc04561883c6cdc405dea133d734bf8acb70b6c526e8ecaf8870
7
- data.tar.gz: 5b908df4984d24c1218c49c3e9e53dca009ea86c4bc534ec584784b22977e0d63de6e9087254fbb1c98df5caf202f002ca1cc88d577e529b742ebf4cc5eabf99
6
+ metadata.gz: e78a4af21623402d3a363f4af61e1c6e3ca9d1e0731f2758b0163be9c9e35df9cea52b9fc3fb2a3830d676ef27b0eb042db60fbb4b680a1717248007f55bee55
7
+ data.tar.gz: 3f31ee6e9d6ef944fa62b9f1ea1b5e7aea1a9179ab988d60277872c0d0ddd4fc6133c2405e1779ccd3a928d9ed96ec3bcef038e65701549f58fc5436b1015033
@@ -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-beta1".freeze
2
+ VERSION = "1.8.0".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.pre.beta1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brock Fanning
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-21 00:00:00.000000000 Z
11
+ date: 2022-03-31 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: 1.3.1
107
+ version: '0'
108
108
  requirements: []
109
109
  rubygems_version: 3.0.9
110
110
  signing_key: