jekyll-theme-isotc211-helpers 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -0
- data/jekyll-theme-isotc211-helpers.gemspec +1 -1
- data/lib/jekyll-theme-isotc211-helpers/resource_listing.rb +19 -16
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18514a72710e52ab9e597cdaaf04d060c861d4577654ede701b0917b033441a2
|
4
|
+
data.tar.gz: 4cc8d131a4372a249589ee3adbfd2515091b414281379c6ace7bd32a0778c519
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff143f23193ea76f1976212b07ec0e4d6ac6a5271f8b3e291168a77aba8ebe735a834f4c5bc9e8f470f66bca2c083f38a0ed3fb026bde512b2f1aaad96913534
|
7
|
+
data.tar.gz: 1d76bde595eb14cb513ee658249385d7f139a290367111d63fafbb8719917bdf9aacd9a96a95eb2c54065af243a405d62ee00014c3233d81edad27a159438c8d
|
data/Rakefile
ADDED
@@ -20,6 +20,8 @@ module Jekyll
|
|
20
20
|
|
21
21
|
self.process(@name)
|
22
22
|
|
23
|
+
puts resources
|
24
|
+
|
23
25
|
self.data = {
|
24
26
|
'layout' => layout || 'resource-index',
|
25
27
|
'title' => header,
|
@@ -78,32 +80,33 @@ module Jekyll
|
|
78
80
|
# Returns a data structure representing a tree of resource subdirectories & files
|
79
81
|
def read_resource_contents(dir, id, listing_id)
|
80
82
|
cfg = self.config['resource_listings'][listing_id]
|
81
|
-
|
83
|
+
directory_hash(dir, "#{cfg['resource_label'].capitalize} #{id}")
|
82
84
|
end
|
83
85
|
|
84
86
|
def generate_resource_pages
|
85
|
-
|
87
|
+
return unless self.config.key?('resource_listings')
|
88
|
+
|
89
|
+
self.config['resource_listings'].each do |listing_id, cfg|
|
90
|
+
resources = {}
|
86
91
|
|
87
|
-
|
88
|
-
resources = {}
|
92
|
+
Pathname(cfg['resource_root']).children.sort.each do |resource_dir|
|
89
93
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
# Ignore dot-directories
|
94
|
-
next
|
95
|
-
end
|
94
|
+
# Ignore non-directories
|
95
|
+
next unless File.directory?(resource_dir)
|
96
|
+
basename = File.basename(resource_dir)
|
96
97
|
|
97
|
-
|
98
|
-
|
99
|
-
contents = self.read_resource_contents(resource_dir.to_s, id, listing_id)
|
100
|
-
self.write_resource_page(listing_id, id, contents)
|
101
|
-
end
|
98
|
+
# Ignore dot-directories
|
99
|
+
next if basename[0] == '.'
|
102
100
|
|
103
|
-
|
101
|
+
id = basename
|
102
|
+
resources[id] = {} # Empty hash can in future be resource metadata
|
103
|
+
contents = self.read_resource_contents(resource_dir.to_s, id, listing_id)
|
104
|
+
self.write_resource_page(listing_id, id, contents)
|
104
105
|
end
|
105
106
|
|
107
|
+
self.write_resource_listing_page(listing_id, resources)
|
106
108
|
end
|
109
|
+
|
107
110
|
end
|
108
111
|
|
109
112
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-isotc211-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.50'
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email:
|
57
57
|
- open.source@ribose.com
|
58
58
|
executables: []
|
@@ -61,6 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- LICENSE.txt
|
63
63
|
- README.md
|
64
|
+
- Rakefile
|
64
65
|
- develop/release
|
65
66
|
- jekyll-theme-isotc211-helpers.gemspec
|
66
67
|
- lib/jekyll-theme-isotc211-helpers.rb
|
@@ -70,7 +71,7 @@ homepage: https://github.com/riboseinc/jekyll-theme-isotc211-helpers/
|
|
70
71
|
licenses:
|
71
72
|
- MIT
|
72
73
|
metadata: {}
|
73
|
-
post_install_message:
|
74
|
+
post_install_message:
|
74
75
|
rdoc_options: []
|
75
76
|
require_paths:
|
76
77
|
- lib
|
@@ -86,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
87
|
version: '0'
|
87
88
|
requirements: []
|
88
89
|
rubygems_version: 3.0.3
|
89
|
-
signing_key:
|
90
|
+
signing_key:
|
90
91
|
specification_version: 4
|
91
92
|
summary: Helpers for the ISO/TC 211 Jekyll theme
|
92
93
|
test_files: []
|