jekyll-imgflow 0.1.8 → 0.1.9
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-imgflow/imgflow_tag.rb +9 -6
- data/lib/jekyll-imgflow/version.rb +1 -1
- 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: 031d0986b4c5e0b451cc3d404eb7bc251e5ee61791fa19a9ae71ad5dc2a2e46b
|
|
4
|
+
data.tar.gz: 658faf7858443964c239ebbab8a343e51430c1c5043cf6e413c3c2463d4b68a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 349afebeceaea49781508b0156177cc07eb1cf0d440ef3fe9754cfec279428b76d9ca2716b991744d66523c16a42102c8a31055864612bcb921b313a69d0c900
|
|
7
|
+
data.tar.gz: aef1c22691523d287e2aebb7c4e12f8247f7e2cb9b9999ee0368373141c3eddb88c02c96198bf97364a8e04565d09063f447c33d2cdc89af3b5826f40bedcc15
|
|
@@ -207,13 +207,16 @@ module Jekyll
|
|
|
207
207
|
path_resolver = JekyllImgFlow::PathResolver.new(config)
|
|
208
208
|
|
|
209
209
|
# Handle different path formats
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
normalized_path = image_path.delete_prefix("/")
|
|
211
|
+
originals_prefix = "#{config.originals.chomp('/')}/"
|
|
212
|
+
|
|
213
|
+
if image_path.start_with?("/") || normalized_path.start_with?(originals_prefix)
|
|
214
|
+
# Site-root path, with or without a leading slash:
|
|
215
|
+
# /assets/images/originals/valdemar/photo.jpg
|
|
216
|
+
File.join(site.source, normalized_path)
|
|
213
217
|
else
|
|
214
|
-
#
|
|
215
|
-
|
|
216
|
-
path_resolver.cli_path(image_path)
|
|
218
|
+
# Originals-relative path: photo.jpg or valdemar/photo.jpg
|
|
219
|
+
path_resolver.cli_path(normalized_path)
|
|
217
220
|
end
|
|
218
221
|
end
|
|
219
222
|
|