jekyll-uj-powertools 1.6.2 → 1.6.3

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: 035a3dbc797be68fa2e9dd84f80417b63672994e25362ce47897a254da7faa12
4
- data.tar.gz: b7e4edc28279b80e0aadcae6435dd1283517d6f3aa68b9f65dfe99edfe0ae94a
3
+ metadata.gz: 0bb2525b4822d44d79b90f95dd50e2f4231fc1696825edeaafd13273e42834c4
4
+ data.tar.gz: eb8b0c45df97fd704a7cda6d2d532606ebf260b10d32edc14588728b3de23684
5
5
  SHA512:
6
- metadata.gz: 9c7c040655729bec85fc2c08b36bc84a759b518884c5f408bd75b0b735d05fdfee891b182f24b4b1f53004fe002bc7e23e31ff20fa6722871c82b83fe12964e1
7
- data.tar.gz: 8ebda7bd0080113e1496fa8092889b79f80573a2c8241df1e07708b95e581dd1c143769561c295254070edcf40709cf3a5b48ba3e6965e5a3db524774e33ca0e
6
+ metadata.gz: e08a2ff66c6ba2f03ff2b4e694401c65b09b07a57015b2852e55cae268ab50dd68b2714d7cb5c5b29f755d3a8ab2bca089c63d938587dbdeb94904a3abe2421a
7
+ data.tar.gz: c2248351129af1c9494262f9ec1d99746f495cc3f124d6b875ab0c1bb765b845d38bf3e16ac35e9e9db119f1f7bc5b22ff407f08b2b8c52ce79103274d49fcfa
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  Gem::Specification.new do |spec|
6
6
  # Gem info
7
7
  spec.name = "jekyll-uj-powertools"
8
- spec.version = "1.6.2"
8
+ spec.version = "1.6.3"
9
9
 
10
10
  # Author info
11
11
  spec.authors = ["ITW Creative Works"]
data/lib/tags/iffile.rb CHANGED
@@ -13,13 +13,10 @@ module Jekyll
13
13
  def render(context)
14
14
  # Get the site object
15
15
  site = context.registers[:site]
16
-
17
- puts "[iffile] Input markup: #{@path}"
18
-
16
+
19
17
  # Resolve the path variable if it's a variable name
20
18
  path = context[@path] || @path
21
- puts "[iffile] After context lookup: #{path}"
22
-
19
+
23
20
  # Handle nested variables like page.css_path
24
21
  if @path.include?('.')
25
22
  parts = @path.split('.')
@@ -28,35 +25,19 @@ module Jekyll
28
25
  path = path.is_a?(Hash) ? path[part] : nil
29
26
  break if path.nil?
30
27
  end
31
- puts "[iffile] After nested lookup: #{path}"
32
28
  end
33
-
29
+
34
30
  # Ensure path starts with /
35
31
  path = "/#{path}" unless path.to_s.start_with?('/')
36
- puts "[iffile] Final path to check: #{path}"
37
-
32
+
38
33
  # Check if file exists in static_files
39
- puts "[iffile] Path to check: #{path}"
40
-
41
- # Debug: show first few static files
42
- puts "[iffile] Sample static files (first 5 CSS files):"
43
- site.static_files.select { |f| f.relative_path.end_with?('.css') }.first(5).each do |file|
44
- puts " - #{file.relative_path}"
45
- end
46
-
47
- file_exists = site.static_files.any? { |file|
34
+ file_exists = site.static_files.any? { |file|
48
35
  # Compare both with and without leading slash
49
- matches = file.relative_path == path ||
50
- file.relative_path == path[1..-1] ||
51
- "/#{file.relative_path}" == path
52
- if matches
53
- puts "[iffile] FOUND MATCH: #{file.relative_path}"
54
- end
55
- matches
36
+ file.relative_path == path ||
37
+ file.relative_path == path[1..-1] ||
38
+ "/#{file.relative_path}" == path
56
39
  }
57
-
58
- puts "[iffile] File exists: #{file_exists}"
59
-
40
+
60
41
  if file_exists
61
42
  super
62
43
  else
@@ -67,4 +48,4 @@ module Jekyll
67
48
  end
68
49
  end
69
50
 
70
- Liquid::Template.register_tag('iffile', Jekyll::UJPowertools::IfFileTag)
51
+ Liquid::Template.register_tag('iffile', Jekyll::UJPowertools::IfFileTag)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-uj-powertools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ITW Creative Works