jekyll-bookshop 2.0.0.pre.beta.26 → 2.0.0.pre.beta.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d7c2976e668db5433344a608cc67718ca3ed59f778521064de221f905df2130
4
- data.tar.gz: f5db0f0d6fcdfadfd06731fe0c973eb5fc27938cae16b7824302e98d9d369f4e
3
+ metadata.gz: '0890df27e47662a1d25497b138e3dcfbc21a20bb53f9a329263f29d5982a771a'
4
+ data.tar.gz: c2cf931589394a734bcaed504c4351510fb75efe4248232b82b45da6f2105f5f
5
5
  SHA512:
6
- metadata.gz: b7ae7fdf8e380b998723ac050460e4ac119b096b6e22375dd7bbc622de40ae714f0df8e257e79007d1ba0437b7845e007cfcf316b3eb4e5860f67bb608d1b840
7
- data.tar.gz: d7d35e3b485f4047fbaa1e40126ec58bae6e48808cc5e5f612701821b593d742b612c1f836a8ec94bc4f9327d23a3178c09bb7ef1eb19f0d3cab9fba8b22bb28
6
+ metadata.gz: e0f7950dc07aaddf77c3e15642e1e71803cce8ac505e45390d3c09f56ca930292a0bd96cd3b79b035634e42ff60f84e0848ba3dd068f27ac33d7018af33c88b7
7
+ data.tar.gz: da1295e13b8851bce27e4ae463d82ea2d1c9574b1b8f458a5f5496c488720fa534619ad46e00b4e2a9336376833005f2ebcf12aa12060359ff7f74393f08b840
@@ -5,21 +5,24 @@ module JekyllBookshop
5
5
  def self.extract(site)
6
6
  @site = site
7
7
 
8
- payload_collections = {}
8
+ payload = {}
9
9
  @site.collections.each_pair do |collection, items|
10
- payload_collections[collection] = items.docs.map do |doc|
10
+ payload[collection] = items.docs.map do |doc|
11
11
  doc.data.merge(hydrate_document_fields(doc))
12
12
  end
13
13
  end
14
14
 
15
- payload_collections["data"] = {}
15
+ payload["data"] = {}
16
16
  @site.data.each_pair do |key, value|
17
17
  next if key.to_s.start_with?("_bookshop")
18
18
 
19
- payload_collections["data"][key] = value
19
+ payload["data"][key] = value
20
20
  end
21
21
 
22
- @site.data["_bookshop_site_data"] = { "site" => payload_collections }
22
+ payload["baseurl"] = @site.baseurl
23
+ payload["title"] = @site.config["title"]
24
+
25
+ @site.data["_bookshop_site_data"] = { "site" => payload }
23
26
 
24
27
  update_browser_pages
25
28
 
@@ -39,10 +39,10 @@ module JekyllBookshop
39
39
  <script>window.bookshop_browser_site_data = null;</script>
40
40
  <script src=\"#{host}\"></script>
41
41
  <script>
42
- window.BookshopBrowser = new window.BookshopBrowserClass({
42
+ window.bookshopBrowser = new window.BookshopBrowser({
43
43
  globals: [window.bookshop_browser_site_data]
44
44
  });
45
- window.BookshopBrowser.render();
45
+ window.bookshopBrowser.render();
46
46
  </script>"
47
47
  end
48
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllBookshop
4
- VERSION = "2.0.0.pre.beta.26"
4
+ VERSION = "2.0.0.pre.beta.30"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-bookshop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.beta.26
4
+ version: 2.0.0.pre.beta.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudCannon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-26 00:00:00.000000000 Z
11
+ date: 2021-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll