jekyll-uj-powertools 1.3.1 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06406f26c558d459244fad81422d210523148d4a90bd42d004fcdfcaede642e0
4
- data.tar.gz: d6e23dd0c11253df4dfef38612049904cb251728beade6139a2d5a74f51f3a19
3
+ metadata.gz: f91b80879708adc5fb116e4ce3722237453ddd4ba20c9c1ebf5f798446f45c64
4
+ data.tar.gz: e35de7eebf30b3f535a64abb5f09f06c7c0ea2b75e0c304ccc05571927dca464
5
5
  SHA512:
6
- metadata.gz: a40bb126326706aee31507e2ad02d83a0a1e83ff8927bf99d90f0869d4898034f282f73e27032013c5018c3553ed435964f7de170d4b502f2d3be900ef7e1666
7
- data.tar.gz: 5c5ff4b05d49cfc03312d7eaa834ef0da25c5a56df0c5ec99fcf7452eda94d40b97809d90edfd1fdfea639008e344c5e7cc22460d00bed30a57fcd48fdd0a05d
6
+ metadata.gz: 2ed5f204a4864131bbdbd54fa8838a058e385fa60826274d2208cfee36e3c23b57978df8fcdcd3b972a9629a3825c55618a5b437e012be88768ccb1d4fd09ab6
7
+ data.tar.gz: f4a1853571d6c486aa054e09ed725eb2af9035ada859fac30446a3356943c9b63a665a0d673aba75695471df0f30a1b49c308a6f62060feba91c27207e61c9ee
@@ -29,7 +29,13 @@ module Jekyll
29
29
  # Inject a random number into the item's data
30
30
  item.data['random_id'] = rand(100) # Random number between 0 and 99
31
31
 
32
- return unless item.data['layout'] # Skip items without layouts
32
+ # Inject the file extension into the item's data
33
+ if item.respond_to?(:path)
34
+ item.data['extension'] = File.extname(item.path)
35
+ end
36
+
37
+ # Skip items without layouts
38
+ return unless item.data['layout']
33
39
 
34
40
  # Find the layout file by its name
35
41
  layout_name = item.data['layout']
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module UJPowertools
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
@@ -62,6 +62,11 @@ module Jekyll
62
62
  def self.cache_timestamp
63
63
  @cache_timestamp
64
64
  end
65
+
66
+ # Check if a string ends with a specific suffix
67
+ # def uj_ends_with(input, suffix)
68
+ # input.end_with?(suffix)
69
+ # end
65
70
  end
66
71
 
67
72
  # Load Generators
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-uj-powertools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ITW Creative Works
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-17 00:00:00.000000000 Z
11
+ date: 2025-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll