jekyll-theme-assets-updated 2.1 → 2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jekyll-theme-assets-updated.rb +10 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b50503ad0506ccd1b0acdcf131ca120dcb91a7b4c6194200fa82bb284cb68cc8
|
4
|
+
data.tar.gz: 9eb17bbb6ae68ece13d64d2fc56ba9442ef19c458e0c7f94d18ec531f09079cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ae01abaa7346a96ec7ee3adb3e104195baf5158101157b27470368dbd1aab3695f0126ca08032cea0485aba081d37687777c26d9a963fc79d48a53bafc88fdc
|
7
|
+
data.tar.gz: ec855bfb32563b5ce362a60788546b1fd0059f282e9f30eaa59758e9e5d8cc13e994947a6f309e8634bc6804d2f801c1ba6a3d3ad34711fc0279242c0096f072
|
@@ -3,12 +3,16 @@ require 'theme'
|
|
3
3
|
|
4
4
|
# Jekyll Assets hook to discover and register assets of a gem-based Jekyll theme.
|
5
5
|
Jekyll::Assets::Hook.register :env, :before_init do
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
begin # "try" block
|
7
|
+
# Nothing to do if there is no theme
|
8
|
+
return unless jekyll.theme
|
9
|
+
# fetch from theme's "assets" folder
|
10
|
+
fetch_theme_assets(jekyll.theme.public_assets_path)
|
11
|
+
# fetch from theme's "_assets" folder
|
12
|
+
fetch_theme_assets(jekyll.theme.private_assets_path)
|
13
|
+
rescue # optionally: `rescue Exception => ex`
|
14
|
+
return
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
private
|