jekyll-auto-thumbnails 0.3.0 → 0.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: 16ce03cdf3b6510927461c3ce6bc7c1ceb7e6146bdbf5ff5245b4c7926ab5cc9
4
- data.tar.gz: 83656688c847d89c6f2319c3abe464453652c97536aadd081eb931ea8f07a94e
3
+ metadata.gz: badab7b855b42b3de129caa9326ef08afde6c93a8f55ed1d0119219e1c9bbe77
4
+ data.tar.gz: 28546c56d7afb236c67cc19c676ef9f915130b54d171da9f5849ddc33639c05e
5
5
  SHA512:
6
- metadata.gz: b1c00316b696556de42b2c4b873becaa6b5dc95896e5c83599debbdb068947ff153682e881fcf3d6ede108fecb97d647f740c0d166c3f19e0c5649852e09e5cc
7
- data.tar.gz: e2631ed452176bf5bdfccfad0b7f079bfb62578fc4d898f3e92dae0178cf015a392d3ab2f217cd35ef4b41fc0c3a3f56e4d8e745dbec2b9b76f7bbc38bc9e3bf
6
+ metadata.gz: 9b2f23d5add0605be6e59565d90ec01ab5a52ecbe7b7f3a174238dceb3ce3933b80e61d0c2f3dd1ff74aed7ee138cc50d5bd62cc175f419cb6ceca626c366dbe
7
+ data.tar.gz: 7a1a86829c5929152434dbe08acff487f40fbdfe302e8cee4c4af45a06d697fba99d5682ffdfc5988204bbaa9dd6a451c5723be41655dd61b89d6761de675bb1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.2](https://github.com/Texarkanine/jekyll-auto-thumbnails/compare/v0.3.1...v0.3.2) (2025-12-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **build:** I think we were supposed to be including the gemspec...! ([#9](https://github.com/Texarkanine/jekyll-auto-thumbnails/issues/9)) ([0432039](https://github.com/Texarkanine/jekyll-auto-thumbnails/commit/043203953f020140c6507e0bfb338859164fc842))
9
+
10
+ ## [0.3.1](https://github.com/Texarkanine/jekyll-auto-thumbnails/compare/v0.3.0...v0.3.1) (2025-12-20)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * skip non-HTML documents to prevent CSS/SCSS wrapping ([#7](https://github.com/Texarkanine/jekyll-auto-thumbnails/issues/7)) ([c0d71f9](https://github.com/Texarkanine/jekyll-auto-thumbnails/commit/c0d71f971be6098342c1dd4a5070639129c6bce2))
16
+
3
17
  ## [0.3.0](https://github.com/Texarkanine/jekyll-auto-thumbnails/compare/v0.2.1...v0.3.0) (2025-12-11)
4
18
 
5
19
 
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/jekyll-auto-thumbnails/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "jekyll-auto-thumbnails"
7
+ spec.version = JekyllAutoThumbnails::VERSION
8
+ spec.authors = ["Texarkanine"]
9
+ spec.email = ["texarkanine@protonmail.com"]
10
+
11
+ spec.summary = "Automatic image optimization for Jekyll sites"
12
+ spec.description = "Jekyll plugin that automatically generates and serves optimized image thumbnails " \
13
+ "for faster page loads. Scans rendered HTML, generates thumbnails with intelligent " \
14
+ "caching, and seamlessly replaces img src attributes."
15
+ spec.homepage = "https://github.com/Texarkanine/jekyll-auto-thumbnails"
16
+ spec.license = "AGPL-3.0-or-later"
17
+ spec.required_ruby_version = ">= 2.7.0"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/Texarkanine/jekyll-auto-thumbnails"
21
+ spec.metadata["changelog_uri"] = "https://github.com/Texarkanine/jekyll-auto-thumbnails/blob/main/CHANGELOG.md"
22
+ spec.metadata["rubygems_mfa_required"] = "true"
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ spec.files = Dir[
26
+ "*.gemspec",
27
+ "lib/**/*.rb",
28
+ "LICENSE",
29
+ "README.md",
30
+ "CHANGELOG.md"
31
+ ]
32
+ spec.require_paths = ["lib"]
33
+
34
+ # Runtime dependencies
35
+ spec.add_dependency "jekyll", ">= 4.0", "< 5.0"
36
+ spec.add_dependency "nokogiri", "~> 1.15"
37
+
38
+ # Development dependencies
39
+ spec.add_development_dependency "rake", "~> 13.3"
40
+ spec.add_development_dependency "rspec", "~> 3.13"
41
+ spec.add_development_dependency "rubocop", "~> 1.81"
42
+ spec.add_development_dependency "rubocop-rake", "~> 0.7"
43
+ spec.add_development_dependency "rubocop-rspec", "~> 3.8"
44
+ spec.add_development_dependency "simplecov", "~> 0.22"
45
+ spec.add_development_dependency "simplecov-cobertura", "~> 3.1"
46
+ end
@@ -36,6 +36,7 @@ module JekyllAutoThumbnails
36
36
  # Scan all documents and pages
37
37
  (site.documents + site.pages).each do |doc|
38
38
  next unless doc.output
39
+ next unless html_document?(doc)
39
40
 
40
41
  Scanner.scan_html(doc.output, registry, config, site.source)
41
42
  end
@@ -69,6 +70,7 @@ module JekyllAutoThumbnails
69
70
  # Replace URLs in HTML
70
71
  (site.documents + site.pages).each do |doc|
71
72
  next unless doc.output
73
+ next unless html_document?(doc)
72
74
 
73
75
  doc.output = replace_urls(doc.output, url_map)
74
76
  end
@@ -127,7 +129,16 @@ module JekyllAutoThumbnails
127
129
  doc.to_html
128
130
  end
129
131
 
130
- private_class_method :replace_urls
132
+ # Check if a document outputs HTML (not CSS, JS, etc.)
133
+ #
134
+ # @param doc [Jekyll::Document, Jekyll::Page] the document to check
135
+ # @return [Boolean] true if the document outputs HTML
136
+ def self.html_document?(doc)
137
+ ext = File.extname(doc.path || doc.url || "").downcase
138
+ [".html", ".htm", ".md", ".markdown"].include?(ext)
139
+ end
140
+
141
+ private_class_method :replace_urls, :html_document?
131
142
  end
132
143
  end
133
144
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllAutoThumbnails
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-auto-thumbnails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Texarkanine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-11 00:00:00.000000000 Z
11
+ date: 2025-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -154,6 +154,7 @@ files:
154
154
  - CHANGELOG.md
155
155
  - LICENSE
156
156
  - README.md
157
+ - jekyll-auto-thumbnails.gemspec
157
158
  - lib/jekyll-auto-thumbnails.rb
158
159
  - lib/jekyll-auto-thumbnails/configuration.rb
159
160
  - lib/jekyll-auto-thumbnails/digest_calculator.rb