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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '096d8389110e5128cb043db130059fed14d477e859068074645aa2d915453d78'
4
- data.tar.gz: 47808ceb1562c5445bb3d6b6acbca1477a19ab9477e414c712bce676c8dd579e
3
+ metadata.gz: 031d0986b4c5e0b451cc3d404eb7bc251e5ee61791fa19a9ae71ad5dc2a2e46b
4
+ data.tar.gz: 658faf7858443964c239ebbab8a343e51430c1c5043cf6e413c3c2463d4b68a8
5
5
  SHA512:
6
- metadata.gz: 6a22f23719023088512647af702af94e220f7697016cac7ee85d1d894e49be7e2f35c67439e1e6701d14d3a1be20d5cc52cf1961d9dd64da39ae06431b868994
7
- data.tar.gz: e25a2fb82d17e77791776935adfe333cd2f127396702902988b3956b10d41e4a4e3101ec9a50a09aaf44a876c7baa42c32135c37b1fdb785179a946c2472c793
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
- if image_path.start_with?("/")
211
- # Absolute site-root path: /assets/images/originals/valdemar/photo.jpg
212
- File.join(site.source, image_path)
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
- # Relative path: photo.jpg or valdemar/photo.jpg
215
- # Always resolve against the configured originals directory
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllImgFlow
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-imgflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svend Gundestrup