jekyll-bookshop 2.0.0.pre.beta.27 → 2.0.0.pre.beta.31

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: 287b161276acd46c4682560d05b689b7be9fc7424a754ed858a8194d8c2e6c2c
4
- data.tar.gz: 0eb5622db586b9a849b3737d23411b0749cddc44d41e1123214baa1725de8b59
3
+ metadata.gz: abd301d4d8856bf6c1ff6d7698de7d53a069ed94f257bc7cf535ae9051597224
4
+ data.tar.gz: 631bfd7f7c60d59aa9dc08d1769048779526d1192a47e00b4c1d27cb008beb03
5
5
  SHA512:
6
- metadata.gz: 80192e9e353fd8494e513ff8ecef10338537cb28e08bb079ce60b18def0c30e500908d62f876f49bba49d7e6868dbb1fb8bc68c2a7a194176230a53df46733fd
7
- data.tar.gz: 15c3fcf24a660b202565d881393a817b88949080466fcf55c7418d8e10da41057c0e1f82f606446f1252b22e5d24774555d6f8fdf85850e8dedfd6b644b45891
6
+ metadata.gz: b8a35d3e67d403bbe6586c26e19f4315980036713ba17760d4f1e7141e81e0dc7e8040b8b3760b96f15957ea09395db9e09b3481ccb98b515b370bd6640be644
7
+ data.tar.gz: e9b48912d5c9926150cd5d9a21b62d07ec4c5b1c4dca2d33b94b421051b0f9cf1cd6f2255aca305ec459d1267f63a0c0341aed3c004f60f51ea26a955c3393b1
@@ -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.27"
4
+ VERSION = "2.0.0.pre.beta.31"
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.27
4
+ version: 2.0.0.pre.beta.31
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-27 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll