jekyll-bookshop 2.0.0.pre.beta.36 → 2.0.0.pre.beta.40

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: 14537df7c3a1604945df0348f91c1f91d15639df4f2be218b48cf6907cb74425
4
- data.tar.gz: 943c3c9b940a8e5ec52cf1a403c19fcb6dc06e54df5807bb9c5df5baecd0cd2a
3
+ metadata.gz: 2f1f681cc9a3e7e79723e1d61e1e927e728b9975d3e07ea607ca16147567840d
4
+ data.tar.gz: 736605230c79537f68fdb4a65e1d65ab75d044bc02fb0c88571fa1a26004b581
5
5
  SHA512:
6
- metadata.gz: b52ddd0cfc89d48b5b10867a90ea9bcef43ee19283c62e8f3826eb5e8d2c257b8eeecb5e633624e4f8323eee2aafcb1657729a3a927614c87f4e1ee35d4aafc0
7
- data.tar.gz: 49f7dd0b13f6691a21c0d924e32da3c751639807f780842b0f0d68f4ba3b76a5238dc1702708cec20e454246e1f8063297b76fc580847f1ee80d4cb8ba17f655
6
+ metadata.gz: 88f66b91a7c90a187b0b1fb41954200e4a9069ba8e25f7386b1faeeb73dcdcdcf82a392beddf85777eba55476dd8cda4ea1bdf8d0614ccf6f604b298dd95fbc5
7
+ data.tar.gz: 821754d3cb3aedcd1cae3f7bdc33bbc948c6062042f593d687e66cd09e18bd70407f1c4c8d500fed4d1366d67e2df5cbd0ffc6db50cc85a3a3256ab0c9bbcfed
@@ -30,10 +30,19 @@ module JekyllBookshop
30
30
 
31
31
  partial = load_cached_partial(path, context)
32
32
 
33
+ loop_context = ""
34
+ if context.scopes[0]["forloop"]
35
+ name = context.scopes[0]["forloop"].name
36
+ index = context.scopes[0]["forloop"].index - 1
37
+ loop_context = "#{name}[#{index}]"
38
+ end
39
+
33
40
  context.stack do
34
41
  context["include"] = parse_params(context) if @params
35
42
  begin
36
- partial.render!(context)
43
+ "<!--bookshop-live name(#{file}) params(#{@params}) context(#{loop_context.gsub(/-/, '=').gsub(/=include\./, '=')}) -->
44
+ #{partial.render!(context)}
45
+ <!--bookshop-live end-->"
37
46
  rescue Liquid::Error => e
38
47
  e.template_name = path
39
48
  e.markup_context = "included " if e.markup_context.nil?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllBookshop
4
- VERSION = "2.0.0.pre.beta.36"
4
+ VERSION = "2.0.0.pre.beta.40"
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.36
4
+ version: 2.0.0.pre.beta.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudCannon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-01 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll