jekyll-bookshop 2.0.0.pre.beta.28 → 2.0.0.pre.beta.32

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: 425b9717811243490fb1211a00e0dad97c793503695a42b283c9d5bb952c79ae
4
- data.tar.gz: a92d427b4ca898912d8d82bc79fb2e1ff700712d394e1c88407e7c430edb2154
3
+ metadata.gz: e14c20466befb73980d9681968df1b507c6cea90146c11e42954413297ef55a5
4
+ data.tar.gz: e133f6b0aa67cc571c06e68d4c4a7f738a883e6190ce7ffccf2b67aec5f46f8f
5
5
  SHA512:
6
- metadata.gz: 188ac15104ff9e8648afb632fd7b6043ffefd90600d56b81bc3b02f365caae88adf57159de3470915147a20136a323c9a47396369a5870679a031ba0baa309f4
7
- data.tar.gz: cd0902e3188dbbf66e145249f6c5add34e6487329ab3ec0d8239bf91b1d2669ace4debbef7ec99da1140b81353d1842929e64348c4d5ecca897650547261bb5e
6
+ metadata.gz: a89efae6147c914081c0a76ddda02ba3332751c11b7742dd9d320c054eddd45505b4960752f8b6a81896363f75d91348c3ba0b4aebf7f140ed68718a500a99b7
7
+ data.tar.gz: 28a982e738973dc84d561709712f16bf5ce9e95c2e41435efd1e17ba8ac01e91721260fb1a847af8b7db6e95dcfa01e2c75fb97e08511a0095fc56ffe0589e2b
@@ -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
 
@@ -15,7 +15,7 @@ module JekyllBookshop
15
15
  "http://localhost:#{host}/bookshop.js"
16
16
  when host =~ %r!^localhost:\d+$!
17
17
  "http://#{host}/bookshop.js"
18
- when host =~ %r!^/!
18
+ when host =~ %r!^/|https?://!
19
19
  host
20
20
  else
21
21
  "//#{host}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllBookshop
4
- VERSION = "2.0.0.pre.beta.28"
4
+ VERSION = "2.0.0.pre.beta.32"
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.28
4
+ version: 2.0.0.pre.beta.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudCannon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-23 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll