hyde-page-js 0.3.3 → 0.4.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hyde-page-js.rb +5 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eee9b1d2c569ffec0d14030836c846c6935df3f9631abf4743129774c9389e65
4
- data.tar.gz: 7782118903c49b5f00696c5ad22d4e84738547710586fb70f2ffb49e485032d4
3
+ metadata.gz: e4de59b04036dcd1acbdc077d7d1797acc9a6547505e5bbbea92213838c6da20
4
+ data.tar.gz: b72a3164064c7e6cb76102904cea70903b91b5e8cba70a6b1d16ca3a83414ede
5
5
  SHA512:
6
- metadata.gz: a5544c76ef9087c63bed5335d89f9a0184e650f473b7491f55bfe05ecee4e180392809f1b76c5a6c8225bb459375307c50737a8dd5f440651f0861d831adb8c7
7
- data.tar.gz: dca9c39399445509288ce0144c277afaeacd3268fa2dc12043880e32a9fb4be548927d262cd0a46f1a50070b1aa51e8bcc635ca67253997403b2dcc8d3b0d93d
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.3"
16
+ VERSION = "0.4.0"
17
17
  end
18
18
 
19
19
  class GeneratedJsFile < Jekyll::StaticFile
@@ -73,6 +73,7 @@ module Hyde
73
73
  return if js_groups.flatten.empty?
74
74
 
75
75
  for group in js_groups
76
+ next if group.empty?
76
77
  lookup_name = names_to_key(group)
77
78
  cache_entry = @site.data['_hyde_pages_cache'].fetch(lookup_name, nil)
78
79
 
@@ -103,7 +104,7 @@ module Hyde
103
104
  end
104
105
 
105
106
  # assign to site.data.js_files for liquid output
106
- add_to_urls(cache_entry&.fetch(:url, nil))
107
+ add_to_urls(cache_entry&.fetch(:url, nil), cache_entry&.fetch(:data, nil))
107
108
  end
108
109
  end
109
110
 
@@ -113,9 +114,9 @@ module Hyde
113
114
  names.join('-')
114
115
  end
115
116
 
116
- def add_to_urls(url)
117
+ def add_to_urls(url, data)
117
118
  @page.data['js_files'] ||= []
118
- @page.data['js_files'].push(url)
119
+ @page.data['js_files'].push({ "path" => url, "content" => data })
119
120
  end
120
121
 
121
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.3
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: 2023-12-28 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