hyde-page-js 0.3.4 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hyde-page-js.rb +6 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1168c8847b2fd068219a18afbdae7dabe33a10a3ff32ab72c6aaaf636bb1a6fa
|
4
|
+
data.tar.gz: 48245960f5bce1e13fde656141b0d0d0826ad3cea47c777e94bd0a3f138ab707
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbb7b848ffe41e9cdff801e040550cc4686b3414e21308eb491b25e17d5ef4978d306eb0603211efad9a86011edd4123d38023fa1131fdea81eb091bef5d9484
|
7
|
+
data.tar.gz: 9433d3642a63480e82da2e34d8db985349cb249a4cfd6e8577a11037fe26ea8e1545b36fe06342656ed2ffd89e1c4e30cba40e74a0eb1c9eec23b3a7b0b56b1a
|
data/lib/hyde-page-js.rb
CHANGED
@@ -13,7 +13,7 @@ end
|
|
13
13
|
module Hyde
|
14
14
|
module Page
|
15
15
|
class Js
|
16
|
-
VERSION = "0.
|
16
|
+
VERSION = "0.4.1"
|
17
17
|
end
|
18
18
|
|
19
19
|
class GeneratedJsFile < Jekyll::StaticFile
|
@@ -73,7 +73,9 @@ module Hyde
|
|
73
73
|
return if js_groups.flatten.empty?
|
74
74
|
|
75
75
|
for group in js_groups
|
76
|
+
next if group.nil?
|
76
77
|
next if group.empty?
|
78
|
+
|
77
79
|
lookup_name = names_to_key(group)
|
78
80
|
cache_entry = @site.data['_hyde_pages_cache'].fetch(lookup_name, nil)
|
79
81
|
|
@@ -104,7 +106,7 @@ module Hyde
|
|
104
106
|
end
|
105
107
|
|
106
108
|
# assign to site.data.js_files for liquid output
|
107
|
-
add_to_urls(cache_entry&.fetch(:url, nil))
|
109
|
+
add_to_urls(cache_entry&.fetch(:url, nil), cache_entry&.fetch(:data, nil))
|
108
110
|
end
|
109
111
|
end
|
110
112
|
|
@@ -114,9 +116,9 @@ module Hyde
|
|
114
116
|
names.join('-')
|
115
117
|
end
|
116
118
|
|
117
|
-
def add_to_urls(url)
|
119
|
+
def add_to_urls(url, data)
|
118
120
|
@page.data['js_files'] ||= []
|
119
|
-
@page.data['js_files'].push(url)
|
121
|
+
@page.data['js_files'].push({ "path" => url, "content" => data })
|
120
122
|
end
|
121
123
|
|
122
124
|
def fetch_config
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyde-page-js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory Daynes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
|
-
rubygems_version: 3.5.
|
74
|
+
rubygems_version: 3.5.22
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: Plugin for jekyll to enable per page js files
|