jekyll-open-sdg-plugins 0.0.14 → 0.0.15
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f9591bf9addbd5b82278cf7ef46962618b5ecbf3505f4472bd4615e3ff3aff2
|
4
|
+
data.tar.gz: 332fdafada6b3edfae87e665df1ae4e82bcefcf1797212dd90f6a8f5c5b82385
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72b6827c60330f67ecd669d19672f1a9d3d1aa00ea38d7f312a4420bca4e993eafc11449ac7473d13463ed4d868c745c669726a603c78a514b2c1ef0eda69539
|
7
|
+
data.tar.gz: 5a83820ae23e5a1ac06973b5e6bd0dfb4eb58269f5d905aa731b0f4ec74cb41326d73255868edb5ac3f6c67e877a55ecf93c249fe4ecfcbd776331440094a0a9
|
@@ -19,12 +19,22 @@ module JekyllOpenSdgPlugins
|
|
19
19
|
if site.config['create_goals'].key?('layout')
|
20
20
|
layout = site.config['create_goals']['layout']
|
21
21
|
end
|
22
|
+
# See if we need to "map" any language codes.
|
23
|
+
languages_public = Hash.new
|
24
|
+
if site.config['languages_public']
|
25
|
+
languages_public = site.config['languages_public']
|
26
|
+
end
|
22
27
|
# Loop through the languages.
|
23
28
|
site.config['languages'].each_with_index do |language, index|
|
29
|
+
# Get the "public language" (for URLs) which may be different.
|
30
|
+
language_public = language
|
31
|
+
if languages_public[language]
|
32
|
+
language_public = languages_public[language]
|
33
|
+
end
|
24
34
|
# Loop through the goals.
|
25
35
|
goals.sort.each do |goal, value|
|
26
36
|
# Add the language subfolder for all except the default (first) language.
|
27
|
-
dir = index == 0 ? goal.to_s : File.join(
|
37
|
+
dir = index == 0 ? goal.to_s : File.join(language_public, goal.to_s)
|
28
38
|
# Create the goal page.
|
29
39
|
site.collections['goals'].docs << GoalPage.new(site, site.source, dir, goal, language, layout)
|
30
40
|
end
|
@@ -13,12 +13,22 @@ module JekyllOpenSdgPlugins
|
|
13
13
|
if site.config['create_indicators'].key?('layout')
|
14
14
|
layout = site.config['create_indicators']['layout']
|
15
15
|
end
|
16
|
+
# See if we need to "map" any language codes.
|
17
|
+
languages_public = Hash.new
|
18
|
+
if site.config['languages_public']
|
19
|
+
languages_public = site.config['languages_public']
|
20
|
+
end
|
16
21
|
# Loop through the languages.
|
17
22
|
site.config['languages'].each_with_index do |language, index|
|
23
|
+
# Get the "public language" (for URLs) which may be different.
|
24
|
+
language_public = language
|
25
|
+
if languages_public[language]
|
26
|
+
language_public = languages_public[language]
|
27
|
+
end
|
18
28
|
# Loop through the indicators (using metadata as a list).
|
19
29
|
site.data['meta'].each do |inid, meta|
|
20
30
|
# Add the language subfolder for all except the default (first) language.
|
21
|
-
dir = index == 0 ? inid : File.join(
|
31
|
+
dir = index == 0 ? inid : File.join(language_public, inid)
|
22
32
|
# Create the indicator page.
|
23
33
|
site.collections['indicators'].docs << IndicatorPage.new(site, site.source, dir, inid, language, layout)
|
24
34
|
end
|
@@ -54,12 +54,23 @@ module JekyllOpenSdgPlugins
|
|
54
54
|
pages = site.config['create_pages']['pages']
|
55
55
|
end
|
56
56
|
|
57
|
+
# See if we need to "map" any language codes.
|
58
|
+
languages_public = Hash.new
|
59
|
+
if site.config['languages_public']
|
60
|
+
languages_public = site.config['languages_public']
|
61
|
+
end
|
62
|
+
|
57
63
|
# Loop through the languages.
|
58
64
|
site.config['languages'].each_with_index do |language, index|
|
65
|
+
# Get the "public language" (for URLs) which may be different.
|
66
|
+
language_public = language
|
67
|
+
if languages_public[language]
|
68
|
+
language_public = languages_public[language]
|
69
|
+
end
|
59
70
|
# Loop through the pages.
|
60
71
|
pages.each do |page|
|
61
72
|
# Add the language subfolder for all except the default (first) language.
|
62
|
-
dir = index == 0 ? page['folder'] : File.join(
|
73
|
+
dir = index == 0 ? page['folder'] : File.join(language_public, page['folder'])
|
63
74
|
# Create the page.
|
64
75
|
site.pages << OpenSdgPage.new(site, site.source, dir, page, language)
|
65
76
|
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: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brock Fanning
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|