jekyll-bookshop 2.0.0.pre.alpha.1 → 2.0.0.pre.alpha.6

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: e50503a293fa35c489d60225d2a9839c8ad1d09020acf839f04aaadd73a857be
4
- data.tar.gz: 54a21e0e7649fe504193193a2558e3e276ca9539e54c2b4cc115558f0ad6b7c7
3
+ metadata.gz: 547820823e84a8f724261d8ad21f9da6453543e62e0d352506fa178455860932
4
+ data.tar.gz: 76e11bf1ef21346e48c80f7bb58241e2a5dd371f93563d1eae1d156f883f6998
5
5
  SHA512:
6
- metadata.gz: 441897214a67dfdcf1db45c06391484ccb9f59946094799dcaca8aa72362f8783046d5ca9bb835a132e4a84bca3af663c029449af8930e4dbdc53f27920855ce
7
- data.tar.gz: 8664dbc2912fd38ba23004122c0b2db83d91c5c499bf1f0d7559d0c13bfc6614a28d6d336348fedad89afa4b10483e12668d8f92127feb3f232b7fdfbc84a336
6
+ metadata.gz: 78351e3aa8d0474f42c7ffb0f447c0e92b47503273b01e8e638b61e2363c52c1de707763c8738c79f7d7d5a43ca0b23cdf6df0bb576fa9d9499ec43354266992
7
+ data.tar.gz: 826de74c699df019fd758bfeeb13751938fd9230ad1ca3ab28a2001fa9fd2af2fb2916f606bd77f58f7bab706c6f59603a4d29db644c01f691f10074da22d36b
@@ -6,10 +6,7 @@ module JekyllBookshop
6
6
 
7
7
  # Look for includes in the built bookshop directory
8
8
  def tag_includes_dirs(context)
9
- bookshop_locations = context['site']['bookshop_locations']&.collect do |location|
10
- Pathname.new(location + "/components").cleanpath.to_s
11
- end
12
- bookshop_locations.freeze
9
+ context['site']['bookshop_component_locations'].freeze
13
10
  end
14
11
 
15
12
  # Support the bind syntax, spreading an object into params
@@ -91,16 +88,28 @@ module JekyllBookshop
91
88
 
92
89
  # Add the paths to find bookshop's styles
93
90
  def self.open_bookshop(site)
94
- bookshop_locations = site.config['bookshop_locations']&.collect do |location|
95
- Pathname.new(location + "/").cleanpath.to_s
91
+ base_bookshop_locations = site.config['bookshop_locations']&.collect do |location|
92
+ Pathname.new("#{site.source}/#{location}/").cleanpath.to_s
93
+ end
94
+ base_bookshop_locations = base_bookshop_locations.select do |location|
95
+ Dir.exist?(location)
96
+ end
97
+ bookshop_component_locations = base_bookshop_locations&.collect do |location|
98
+ Pathname.new("#{location}/components/").cleanpath.to_s
96
99
  end
97
100
 
98
101
  site.config['watch_dirs'] ||= [] # Paired with CloudCannon/jekyll-watch
99
- site.config['watch_dirs'].push(*bookshop_locations);
102
+ site.config['watch_dirs'].push(*base_bookshop_locations);
100
103
 
101
104
  site.config['sass'] ||= {}
102
105
  site.config['sass']['load_paths'] ||= []
103
- site.config['sass']['load_paths'].push(*bookshop_locations)
106
+ site.config['sass']['load_paths'].push(*base_bookshop_locations)
107
+
108
+ site.config['bookshop_locations'] = []
109
+ site.config['bookshop_locations'].push(*base_bookshop_locations)
110
+
111
+ site.config['bookshop_component_locations'] ||= []
112
+ site.config['bookshop_component_locations'].push(*bookshop_component_locations)
104
113
  end
105
114
  end
106
115
 
@@ -1,3 +1,3 @@
1
1
  module JekyllBookshop
2
- VERSION = "2.0.0-alpha.1"
2
+ VERSION = "2.0.0.pre.alpha.6"
3
3
  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.alpha.1
4
+ version: 2.0.0.pre.alpha.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liam Bigelow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-23 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll