jekyll-bookshop 2.0.0.pre.beta.29 → 2.0.0.pre.beta.33

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: 8fc91c4397b5745c9e8e0d7e869c6e6dcd939223a9c4aa4070fb99669787ae70
4
- data.tar.gz: 65789416029fa5445cdf2add1a391979b7472602a31eea258245ab98de8fa5a6
3
+ metadata.gz: 76bc158f6eb746b3abd0b5e5e0c8923de157db70cb6363c4948b806880030c82
4
+ data.tar.gz: 64f5ed68b3704a2eda537eb6240a9a8148016df23f93836ed7feb3fa69c6789f
5
5
  SHA512:
6
- metadata.gz: 525fbf8530d5f2c5c32cb4040176641aaf531c2a1b3140f0684cf7558dcfbe380bb3375c05860ebfba727f089e4bd7d215dfb0e6204f1ba99e8fc92d48b14ec1
7
- data.tar.gz: bed6038690c4fb03fa3956f04ff9353e566f99900ca746859b9c36574644d3e93656fda401dda2414460bd61557b20dd85a3a2b94103466f20bf1518bb9db889
6
+ metadata.gz: cdfa20dd13e11a23289b41ed043f49db2d717357b4c533aeef500d362f42261a5c05981101ffede391e14237a986bbb27a0ac92c1812bc7592cb69a81a5c8b1a
7
+ data.tar.gz: 9fd10bd2461c181933a68f46903a392bde6f1ef418eaa7507456635bf04ba04fed623d6e3a2ef5cb064a0e6b51fb8559be265b3f8cb920d4ee3de74507d63039
@@ -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.29"
4
+ VERSION = "2.0.0.pre.beta.33"
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.29
4
+ version: 2.0.0.pre.beta.33
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