jekyll-bookshop 2.0.0.pre.alpha.3 → 2.0.0.pre.alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-bookshop.rb +16 -10
- data/lib/jekyll-bookshop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0ef8591510abbc4fe50bd326fd6d2387da047b547e7f54582b07d1ebf3f2ace
|
4
|
+
data.tar.gz: 7e02ca2b237eff55023a1a12ad3b78abf71a72499c781e69761bacf3e8ab2d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bd9f64db37ca097bb9431f1e8a4dcedac9834b6e60a689db434c52787cbf4e04d20f8a46dc2a207d8fc62368b7f6238216a793135cd59b70a14aab51e214575
|
7
|
+
data.tar.gz: 16f22b6f1a460f4be51803233196a0f6f096cbcc4da8b4f311cb2e6965e7abc39335b33044e4e099e60ccbf3379daa84169806bd61b575d09a12d541a0bdefa5
|
data/lib/jekyll-bookshop.rb
CHANGED
@@ -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
|
-
|
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
|
@@ -63,7 +60,7 @@ module JekyllBookshop
|
|
63
60
|
site = context.registers[:site]
|
64
61
|
|
65
62
|
bookshop_scss_files = []
|
66
|
-
site.config['
|
63
|
+
site.config['bookshop_base_locations']&.each do |location|
|
67
64
|
components_loc = Pathname.new(location + "/").cleanpath.to_s
|
68
65
|
scss_files = Dir.glob(components_loc + "/**/*.scss")&.collect do |scss_file|
|
69
66
|
scss_file.sub!(components_loc+"/", '').sub!(".scss", '')
|
@@ -91,19 +88,28 @@ module JekyllBookshop
|
|
91
88
|
|
92
89
|
# Add the paths to find bookshop's styles
|
93
90
|
def self.open_bookshop(site)
|
94
|
-
|
95
|
-
Pathname.new(location
|
91
|
+
bookshop_base_locations = site.config['bookshop_locations']&.collect do |location|
|
92
|
+
Pathname.new("#{site.source}/#{location}/").cleanpath.to_s
|
96
93
|
end
|
97
|
-
|
94
|
+
bookshop_base_locations = bookshop_base_locations.select do |location|
|
98
95
|
Dir.exist?(location)
|
99
96
|
end
|
97
|
+
bookshop_component_locations = bookshop_base_locations&.collect do |location|
|
98
|
+
Pathname.new("#{location}/components/").cleanpath.to_s
|
99
|
+
end
|
100
100
|
|
101
101
|
site.config['watch_dirs'] ||= [] # Paired with CloudCannon/jekyll-watch
|
102
|
-
site.config['watch_dirs'].push(*
|
102
|
+
site.config['watch_dirs'].push(*bookshop_base_locations);
|
103
103
|
|
104
104
|
site.config['sass'] ||= {}
|
105
105
|
site.config['sass']['load_paths'] ||= []
|
106
|
-
site.config['sass']['load_paths'].push(*
|
106
|
+
site.config['sass']['load_paths'].push(*bookshop_base_locations)
|
107
|
+
|
108
|
+
site.config['bookshop_base_locations'] ||= []
|
109
|
+
site.config['bookshop_base_locations'].push(*bookshop_base_locations)
|
110
|
+
|
111
|
+
site.config['bookshop_component_locations'] ||= []
|
112
|
+
site.config['bookshop_component_locations'].push(*bookshop_component_locations)
|
107
113
|
end
|
108
114
|
end
|
109
115
|
|
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.
|
4
|
+
version: 2.0.0.pre.alpha.8
|
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-
|
11
|
+
date: 2021-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|