jekyll-auto-image-include 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 848940bd69313e72843c2fc4ade9e40239b7ff3d
4
- data.tar.gz: 1f72e2a793f480815575ee7ca78e607956bdf60b
3
+ metadata.gz: 1e7bc725e4a856bb3ed2c7ee308ed1b8dbb55e90
4
+ data.tar.gz: 4b63219c424a72c369bdd9b5c79b596e18671d42
5
5
  SHA512:
6
- metadata.gz: 0de76a7e6bebebd8b832073151da8c5df75f5db012fb70cfefca698a3cdcb64ba308cb98dffd0cfb7ca896a0245abb8ed6ea762245d925433654dde21b36bdc5
7
- data.tar.gz: 1382646edb64bde82711c73ec517cc649e0ef96b1e0b2b29e78cb7eb2207f01fa7503d7866b73d755088d9ec79353e25ccecaab50ac3bd2b2c58de9c6a1b6708
6
+ metadata.gz: 4b8595580f337f68215d4d5f3b385dc539bf368961247c7c0bc0cf29877c14880cfbcad6723ea929f1eb65d9663d8d3e5e48f500534511c664a1d238b4fcaa9c
7
+ data.tar.gz: d0619d53adb6a2ba342d748cd04f4844cb93a9c78f60c6e7a2e5cb6033910dcb7b018904f963cd2537767da27a3c13a4e58b9a7d9e45048a33c1b75a36c49087
@@ -34,12 +34,12 @@ module Jekyll
34
34
 
35
35
  output = ''
36
36
 
37
- folder = File.join(base_dir, dir, "*.{jpg,png}")
38
- files = Dir.glob(folder, File::FNM_CASEFOLD )
37
+ folder = File.join(base_dir, dir, "/**/*.{jpg,jpeg,png,gif,bmp,tif,tiff,svg}")
38
+ files = Dir.glob(folder, File::FNM_CASEFOLD).sort
39
39
  files.each do |image_fullpath|
40
+ image_path = image_fullpath.sub(base_dir, '')
40
41
  image_name = File.basename(image_fullpath)
41
- image_path = dir + '/' + image_name
42
- output += "<a href=\"#{image_path}\"><img src=\"#{image_path}\" alt=\"#{image_name}\"></a>"
42
+ output += "\n<a href=\"#{image_path}\"><img src=\"#{image_path}\" alt=\"#{image_name}\"></a>"
43
43
  end
44
44
  output
45
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-auto-image-include
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Friedrich