jekyll-open-sdg-plugins 2.2.0.pre.beta1 → 2.3.0.pre.beta1

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: 82e500677f2b7d28cf2f0ad5bd9559d0dd4ab91c873b4b2619d54ab83383cb2c
4
- data.tar.gz: 136c1ab6c3b3c53592dbf5e411a72578ac504e014f83a3d56965c7e24dd72d5f
3
+ metadata.gz: 19b31bd6706a47dcbf2c07f210aa589639fc8ce67410e3843bb537a200980770
4
+ data.tar.gz: 0da1202bfcbb679a36d5e4f2d7438246872743ec6d33e13e7caf6a22ef3476ec
5
5
  SHA512:
6
- metadata.gz: 55fa1efb7c666a0fa4aa52fafa36d51f635a0fcfddd7171546170fbbf41c05ddb688585cabd84993d095f0891ed0e4d6250f5bbd5ea1004948f753183be961b0
7
- data.tar.gz: c490a887fe8a56151831476563639e84a40216fca4be75485a49ff734041beaedfde287844faffcc80b38c73abd2bedac555c655359b39a82bc70df9094a0e1c
6
+ metadata.gz: ad5b6e143538c031cc803114b93af911c496b471f7ac1310003d5230debb5c79a6b359f15f856700fe534f13f6a310ecbbb57095b612cdc2e62047c9f3ade3b6
7
+ data.tar.gz: 656cfd31efc7b480fdba2b798531a308efca2e5bf03853f7b9f4431cc53045408dd81119f90889ec05eecc625b05d57426391a8c75d95b282597fea8b34c2f0b
@@ -6,12 +6,16 @@ jobs:
6
6
  test:
7
7
 
8
8
  runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby: [ '2.6', '2.7', '3.2' ]
9
12
 
13
+ name: Ruby ${{ matrix.ruby }} test
10
14
  steps:
11
15
  - uses: actions/checkout@v1
12
16
  - name: Set up Ruby 2.6
13
17
  uses: ruby/setup-ruby@v1
14
18
  with:
15
- ruby-version: '2.6'
19
+ ruby-version: ${{ matrix.ruby }}
16
20
  - name: Run all tests
17
21
  run: make test
@@ -44,6 +44,11 @@ module JekyllOpenSdgPlugins
44
44
 
45
45
  # Create the indicator page.
46
46
  site.collections['indicators'].docs << IndicatorPage.new(site, site.source, dir, inid, language, layout)
47
+ # Also create the iframe version.
48
+ iframe_layout = 'indicator-iframe'
49
+ iframe_permalink = permalink + '-iframe'
50
+ iframe_dir = index == 0 ? iframe_permalink : File.join(language_public, iframe_permalink)
51
+ site.collections['pages'].docs << IndicatorPage.new(site, site.source, iframe_dir, inid, language, iframe_layout)
47
52
  end
48
53
  end
49
54
  # Create the indicator settings configuration/metadata/data pages.
@@ -39,7 +39,7 @@ module JekyllOpenSdgPlugins
39
39
  endpoint = is_remote ? path + '/' + value : File.join(path, fix_path(value))
40
40
 
41
41
  begin
42
- json_file = is_remote ? open(endpoint) : File.open(endpoint)
42
+ json_file = is_remote ? URI.open(endpoint) : File.open(endpoint)
43
43
  build[key] = JSON.load(json_file)
44
44
  rescue StandardError => e
45
45
  # For backwards compatibility, forego the exception in some cases.
@@ -10,7 +10,7 @@ module JekyllOpenSdgPlugins
10
10
 
11
11
  routes = {}
12
12
  baseurl = ''
13
- if site.config.has_key?('baseurl')
13
+ if site.config.has_key?('baseurl') and site.config['baseurl'].is_a?(String)
14
14
  baseurl = site.config['baseurl']
15
15
  end
16
16
  unless baseurl.end_with?('/')
@@ -310,6 +310,8 @@
310
310
  "title": "Position",
311
311
  "description": "Placement of the label along the line.",
312
312
  "enum": [
313
+ "start",
314
+ "end",
313
315
  "top",
314
316
  "bottom",
315
317
  "left",
@@ -326,7 +328,14 @@
326
328
  "fontColor": {
327
329
  "type": "string",
328
330
  "format": "color",
329
- "title": "Label color",
331
+ "title": "Label color (do not use)",
332
+ "description": "[DEPRECATED: USE 'Label color (use this)' INSTEAD]",
333
+ "default": "#000000"
334
+ },
335
+ "color": {
336
+ "type": "string",
337
+ "format": "color",
338
+ "title": "Label color (use this)",
330
339
  "description": "Color for the label text.",
331
340
  "default": "#000000"
332
341
  },
@@ -360,7 +369,14 @@
360
369
  "type": "string",
361
370
  "format": "color",
362
371
  "default": "#ffffff",
363
- "title": "High-contrast label color",
372
+ "title": "High-contrast label color (do not use)",
373
+ "description": "[DEPRECATED: USE 'High-contrast label color (use this)' INSTEAD]"
374
+ },
375
+ "color": {
376
+ "type": "string",
377
+ "format": "color",
378
+ "default": "#ffffff",
379
+ "title": "High-contrast label color (use this)",
364
380
  "description": "Color for the label text in high-contrast mode."
365
381
  },
366
382
  "backgroundColor": {
@@ -1203,6 +1203,36 @@
1203
1203
  }
1204
1204
  ]
1205
1205
  },
1206
+ "observation_attributes": {
1207
+ "options": {"collapsed": true},
1208
+ "type": "array",
1209
+ "title": "Observation attributes",
1210
+ "description": "This setting can be used to specify data columns to be considered 'observation attributes' and displayed along with individual data-points.",
1211
+ "items": {
1212
+ "type": "object",
1213
+ "title": "Observation attribute",
1214
+ "properties": {
1215
+ "field": {
1216
+ "type": "string",
1217
+ "minLength": 1,
1218
+ "title": "Field",
1219
+ "description": "Column name in the data."
1220
+ },
1221
+ "label": {
1222
+ "type": "string",
1223
+ "minLength": 1,
1224
+ "title": "Label",
1225
+ "description": "Optional label when displayed in footnotes."
1226
+ }
1227
+ }
1228
+ },
1229
+ "links": [
1230
+ {
1231
+ "rel": "More information on the observation attributes setting",
1232
+ "href": "https://open-sdg.readthedocs.io/en/latest/configuration/#observation_attributes"
1233
+ }
1234
+ ]
1235
+ },
1206
1236
  "progress_status": {
1207
1237
  "options": {"collapsed": true},
1208
1238
  "type": "object",
@@ -1335,6 +1365,11 @@
1335
1365
  { "$ref": "#/definitions/title_and_description" },
1336
1366
  {
1337
1367
  "properties": {
1368
+ "disaggregation_indicator_count_label": {
1369
+ "title": "Disaggregation indicator count label",
1370
+ "type": "string",
1371
+ "description": "An alternative label to use for the indicator count on the disaggregation tab, to be display after a number."
1372
+ },
1338
1373
  "disaggregation_tabs": {
1339
1374
  "title": "Disaggregation tabs",
1340
1375
  "type": "boolean",
@@ -541,7 +541,7 @@ module JekyllOpenSdgPlugins
541
541
  end
542
542
  doc.data['logo'] = logo
543
543
 
544
- if collection == 'indicators'
544
+ if collection == 'indicators' || doc.data['layout'] == 'indicator-iframe'
545
545
  # For indicators we also set the current indicator/target/goal.
546
546
  if doc.data.has_key? 'indicator_number'
547
547
  indicator_number = doc.data['indicator_number']
@@ -1,3 +1,3 @@
1
1
  module JekyllOpenSdgPlugins
2
- VERSION = "2.2.0-beta1".freeze
2
+ VERSION = "2.3.0-beta1".freeze
3
3
  end
data/tests/Gemfile CHANGED
@@ -1,7 +1,9 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "jekyll", "3.8.4"
4
- gem "html-proofer"
3
+ gem "jekyll", "3.9.3"
4
+ gem "html-proofer", "3.19.4"
5
5
  gem "jekyll-remote-theme"
6
6
  gem "deep_merge"
7
7
  gem "json_schemer"
8
+ gem "kramdown-parser-gfm"
9
+ gem "webrick"
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: 2.2.0.pre.beta1
4
+ version: 2.3.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: 2023-04-06 00:00:00.000000000 Z
11
+ date: 2023-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: 1.3.1
110
110
  requirements: []
111
- rubygems_version: 3.1.4
111
+ rubygems_version: 3.0.9
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Jekyll plugins for use with the Open SDG platform