hyde-page-js 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hyde-page-js.rb +4 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 638071688d5ecd309d300544d9d203a5f64609bda6203381ee0a45ef1d8a0ae2
4
- data.tar.gz: 91fd23bd129212c6c6257033b66d5e3ce2cefdd440f6a92a7faf1657e4b356fb
3
+ metadata.gz: e4de59b04036dcd1acbdc077d7d1797acc9a6547505e5bbbea92213838c6da20
4
+ data.tar.gz: b72a3164064c7e6cb76102904cea70903b91b5e8cba70a6b1d16ca3a83414ede
5
5
  SHA512:
6
- metadata.gz: 99f760e8c290c41b450fe49594369756c7412c69a024f8737e66a549813c9a1f7c59797bd318f2191b837e24af0e42d36d74b90d1f3edf210fb8f343e73f6132
7
- data.tar.gz: 0633dcf9452d791ea464dc4094d7e45c8411dd06ca307bc2d1255bd38259bc7f200ea03777d7ce2957e416ef0510a8469ad1817e98a386ba92279f0066917240
6
+ metadata.gz: 18715c5a6681bdb6c96c3ce10958d1680b4fad4f1238b54369345e5dd52fde9aecc26ecb6c26b1cc251a3b1c9a54b652fb4a4379fc385ecb63a3e542d184db2f
7
+ data.tar.gz: d7d3d396ccd37befa187cf5358cfbc85074f245272e067c85f18e1618e00af9a5ad385b43077f8f0158c79d92c2f4e5332f921347fee795e7d375a9b75d172e7
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.3.4"
16
+ VERSION = "0.4.0"
17
17
  end
18
18
 
19
19
  class GeneratedJsFile < Jekyll::StaticFile
@@ -104,7 +104,7 @@ module Hyde
104
104
  end
105
105
 
106
106
  # assign to site.data.js_files for liquid output
107
- add_to_urls(cache_entry&.fetch(:url, nil))
107
+ add_to_urls(cache_entry&.fetch(:url, nil), cache_entry&.fetch(:data, nil))
108
108
  end
109
109
  end
110
110
 
@@ -114,9 +114,9 @@ module Hyde
114
114
  names.join('-')
115
115
  end
116
116
 
117
- def add_to_urls(url)
117
+ def add_to_urls(url, data)
118
118
  @page.data['js_files'] ||= []
119
- @page.data['js_files'].push(url)
119
+ @page.data['js_files'].push({ "path" => url, "content" => data })
120
120
  end
121
121
 
122
122
  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.3.4
4
+ version: 0.4.0
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-01-01 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll