jekyll-open-sdg-plugins 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +16 -0
- data/.gitignore +4 -0
- data/LICENSE +21 -0
- data/README.md +3 -0
- data/jekyll-open-sdg-plugins.gemspec +16 -0
- data/lib/jekyll-open-sdg-plugins/multilingual_metadata.rb +27 -0
- data/lib/jekyll-open-sdg-plugins/version.rb +3 -0
- data/lib/jekyll-open-sdg-plugins.rb +5 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 85363f52e817024bfeb2495c65aad436d3d19c6cfd213569b0ed170e4bc98914
|
4
|
+
data.tar.gz: 1cbd736c8273adb165ba4bd2a482bc553f4fc59d62a1beda2b4791566d36b057
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5c8f6cc3f8d6c09a54218017c2a82a9ace6efd3145e82512bf0ae073d356dc25641eee42bd762ebd1c8503efdc9d05f03c9e350731dad03b939eb11435026aaf
|
7
|
+
data.tar.gz: dbd1f37bb30f3cc6b3863061f020cbb4eeae60081a534004222eb7748e3f92760250c55f48522cb677ce5d0091078b2661abbc2e2a21a482075325f5c0fd7017
|
data/.editorconfig
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
root = true
|
2
|
+
|
3
|
+
[*]
|
4
|
+
indent_style = space
|
5
|
+
indent_size = 2
|
6
|
+
trim_trailing_whitespace = true
|
7
|
+
insert_final_newline = true
|
8
|
+
|
9
|
+
[*.{md,rb,gemspec},Makefile]
|
10
|
+
charset = utf-8
|
11
|
+
|
12
|
+
[Makefile]
|
13
|
+
indent_style = tab
|
14
|
+
|
15
|
+
[*.md]
|
16
|
+
trim_trailing_whitespace = false
|
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Brock Fanning <brockfanning@gmail.com> (https://github.com/open-sdg/open-sdg
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "jekyll-open-sdg-plugins/version"
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = "jekyll-open-sdg-plugins"
|
6
|
+
spec.summary = "Jekyll plugins for use with the Open SDG platform"
|
7
|
+
spec.description = "Jekyll plugins for use with the Open SDG platform"
|
8
|
+
spec.version = JekyllOpenSdgPlugins::VERSION
|
9
|
+
spec.authors = ["Brock Fanning"]
|
10
|
+
spec.email = ["brockfanning@gmail.com"]
|
11
|
+
spec.homepage = "https://github.com/open-sdg/jekyll-open-sdg-plugins"
|
12
|
+
spec.licenses = ["MIT"]
|
13
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|spec|features)/!) }
|
14
|
+
spec.require_paths = ["lib"]
|
15
|
+
spec.add_dependency "jekyll", "~> 3.0"
|
16
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require "jekyll"
|
2
|
+
|
3
|
+
module JekyllOpenSdgPlugins
|
4
|
+
class MultilingualMetadataGenerator < Jekyll::Generator
|
5
|
+
safe true
|
6
|
+
priority :low
|
7
|
+
|
8
|
+
def generate(site)
|
9
|
+
# Make sure that the translated metadata contains a complete set of values
|
10
|
+
# including non-translated metadata as a fallback. This allows us to treat
|
11
|
+
# the translated metadata as complete when used in layouts and includes.
|
12
|
+
if site.config['languages']
|
13
|
+
site.config['languages'].each do |language|
|
14
|
+
site.data['meta'].each do |indicator_id, meta|
|
15
|
+
if meta[language]
|
16
|
+
meta.each do |meta_key, meta_value|
|
17
|
+
if meta_key != language && !meta[language][meta_key]
|
18
|
+
meta[language][meta_key] = meta_value
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-open-sdg-plugins
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Brock Fanning
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
description: Jekyll plugins for use with the Open SDG platform
|
28
|
+
email:
|
29
|
+
- brockfanning@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".editorconfig"
|
35
|
+
- ".gitignore"
|
36
|
+
- LICENSE
|
37
|
+
- README.md
|
38
|
+
- jekyll-open-sdg-plugins.gemspec
|
39
|
+
- lib/jekyll-open-sdg-plugins.rb
|
40
|
+
- lib/jekyll-open-sdg-plugins/multilingual_metadata.rb
|
41
|
+
- lib/jekyll-open-sdg-plugins/version.rb
|
42
|
+
homepage: https://github.com/open-sdg/jekyll-open-sdg-plugins
|
43
|
+
licenses:
|
44
|
+
- MIT
|
45
|
+
metadata: {}
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
requirements: []
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 2.7.6
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: Jekyll plugins for use with the Open SDG platform
|
66
|
+
test_files: []
|