al_folio_core 1.0.8 → 1.0.10

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: e7397da7deb8e846758d474286e7c0791622138fa84e00ae6050e78a991142e8
4
- data.tar.gz: d80fe0d17deec7a309623b10e7c78b3bae3d5f6979aca16be74f02d08af6c9ef
3
+ metadata.gz: 66296a195e71912cdad50df02367aa43eaebb2785bf798e5b48686f88631f6cb
4
+ data.tar.gz: 82ce88268a763a8097bc774152be1294cb4ff0dd6643a4ac073fceb7d8c1db87
5
5
  SHA512:
6
- metadata.gz: c63b680d173323550550e67c1c356e92096e9288a5b239d56400c56bea2196dd3280d1dd71fc889e6717d3d7ca9079e838a44432b59210efd24a31d0a8a612c0
7
- data.tar.gz: 336b5beb9655b168462042dcc5ea74ed11634f372339d33c8a5316a41fe83cc38c062c26a6c5ac1215e29be3d27fadacd0940c56bb9be52c8aac6e11f0ffd8b3
6
+ metadata.gz: 48dc2c8c89e9595b00f83a3e94cd186aa6808bf24c8c01dc6d9e05a60b0fc549288d042e8276c5e437c686f4cab58698cc394c6c092b82ca560761ca5107049f
7
+ data.tar.gz: db650602bb7e07b752485a5cbda5bab565e828dd6333acefba0df1ecfe74e95ca4b95dfcfd0932cac8875a13acb14d001234413d0988577f30166cbb25943cae
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.10 - 2026-06-01
4
+
5
+ - Replaced leftover jQuery `$(...)` calls with vanilla JS in the publications "N more authors" expander (`_layouts/bib.liquid`) and the responsive-image `onerror` fallback (`_includes/figure.liquid`). Since jQuery was removed in v1 these threw `ReferenceError: $ is not defined` at runtime — the author list never expanded and the broken-image fallback never ran.
6
+ - Fixed `main.css` cache-busting. The theme's `bust_css_cache` digested a non-existent `assets/_sass` directory and therefore always produced the MD5 of an empty string, so `main.css`'s `?v=` query never changed and returning visitors could be served stale CSS after a theme/color update. It now digests the theme's actual `_sass` partials.
7
+
8
+ ## 1.0.9 - 2026-05-24
9
+
10
+ - Retried interrupted `jekyll-minifier` file writes so Jupyter notebook conversion does not fail builds with transient `Errno::EINTR`.
11
+
3
12
  ## 1.0.8 - 2026-05-24
4
13
 
5
14
  - Fixed book-review inline CSS typos and contained floated cover figures within the article flow.
@@ -76,7 +76,7 @@
76
76
  {% elsif site.lazy_loading_images %}
77
77
  loading="lazy"
78
78
  {% endif %}
79
- onerror="this.onerror=null; $('.responsive-img-srcset').remove();"
79
+ onerror="this.onerror=null; document.querySelectorAll('.responsive-img-srcset').forEach(function (n) { n.remove(); });"
80
80
  >
81
81
  </picture>
82
82
 
data/_layouts/bib.liquid CHANGED
@@ -121,12 +121,12 @@
121
121
  class="more-authors"
122
122
  title="click to view {{ more_authors_hide }}"
123
123
  onclick="
124
- var element = $(this);
125
- element.attr('title', '');
126
- var more_authors_text = element.text() == '{{ more_authors_hide }}' ? '{{ more_authors_show }}' : '{{ more_authors_hide }}';
124
+ var element = this;
125
+ element.setAttribute('title', '');
126
+ var more_authors_text = element.textContent == '{{ more_authors_hide }}' ? '{{ more_authors_show }}' : '{{ more_authors_hide }}';
127
127
  var cursorPosition = 0;
128
128
  var textAdder = setInterval(function(){
129
- element.html(more_authors_text.substring(0, cursorPosition + 1));
129
+ element.innerHTML = more_authors_text.substring(0, cursorPosition + 1);
130
130
  if (++cursorPosition == more_authors_text.length){
131
131
  clearInterval(textAdder);
132
132
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AlFolioCore
4
- VERSION = "1.0.8"
4
+ VERSION = "1.0.10"
5
5
  end
data/lib/al_folio_core.rb CHANGED
@@ -100,14 +100,23 @@ module AlFolioCore
100
100
 
101
101
  def directory_files_content
102
102
  local_target_path = File.join(directory, "**", "*")
103
- theme_target_path = File.join(AlFolioCore::THEME_ROOT, local_target_path)
103
+ # jekyll-cache-bust calls `bust_css_cache` with directory "assets/_sass",
104
+ # but the theme ships its Sass partials at "_sass" (the gem root), not
105
+ # under "assets/". Without this mapping the glob matches nothing and the
106
+ # cache-bust digest is the MD5 of an empty string, so main.css is never
107
+ # re-versioned when the theme styles change. Resolve both the literal
108
+ # configured path and the "assets/"-stripped theme location.
109
+ theme_relative_path = File.join(directory.sub(%r{\Aassets/}, ""), "**", "*")
104
110
 
105
111
  files = Dir[local_target_path]
106
- files = Dir[theme_target_path] if files.empty?
112
+ files = Dir[File.join(AlFolioCore::THEME_ROOT, local_target_path)] if files.empty?
113
+ files = Dir[File.join(AlFolioCore::THEME_ROOT, theme_relative_path)] if files.empty?
107
114
  if files.empty?
108
115
  files = Gem.path.flat_map do |gem_path|
109
116
  Dir[File.join(gem_path, "bundler", "gems", "*", local_target_path)] +
110
- Dir[File.join(gem_path, "gems", "*", local_target_path)]
117
+ Dir[File.join(gem_path, "gems", "*", local_target_path)] +
118
+ Dir[File.join(gem_path, "bundler", "gems", "*", theme_relative_path)] +
119
+ Dir[File.join(gem_path, "gems", "*", theme_relative_path)]
111
120
  end
112
121
  end
113
122
 
@@ -132,6 +141,21 @@ module AlFolioCore
132
141
  end
133
142
  end
134
143
 
144
+ module JekyllMinifierEintrRetry
145
+ def output_file(dest, content)
146
+ attempts = 0
147
+
148
+ begin
149
+ super
150
+ rescue Errno::EINTR
151
+ attempts += 1
152
+ retry if attempts < 4
153
+
154
+ raise
155
+ end
156
+ end
157
+ end
158
+
135
159
  module_function
136
160
 
137
161
  def compat_enabled?(site)
@@ -209,6 +233,16 @@ module AlFolioCore
209
233
  cache_digester.prepend(JekyllCacheBustThemeFallback)
210
234
  end
211
235
 
236
+ def patch_jekyll_minifier_for_notebook_output!
237
+ return unless defined?(Jekyll::Compressor)
238
+
239
+ [Jekyll::Document, Jekyll::Page, Jekyll::StaticFile].each do |klass|
240
+ next if klass.ancestors.include?(JekyllMinifierEintrRetry)
241
+
242
+ klass.prepend(JekyllMinifierEintrRetry)
243
+ end
244
+ end
245
+
212
246
  def jupyter_plugin_enabled?(site)
213
247
  Array(site.config["plugins"]).map(&:to_s).include?("jekyll-jupyter-notebook")
214
248
  end
@@ -247,6 +281,7 @@ end
247
281
 
248
282
  AlFolioCore.patch_jekyll_terser_for_theme_assets!
249
283
  AlFolioCore.patch_jekyll_cache_bust_for_theme_assets!
284
+ AlFolioCore.patch_jekyll_minifier_for_notebook_output!
250
285
  Liquid::Template.register_tag("details", AlFolioCore::Tags::DetailsTag)
251
286
  Liquid::Template.register_tag("file_exists", AlFolioCore::Tags::FileExistsTag)
252
287
  Liquid::Template.register_filter(AlFolioCore::Filters::HideCustomBibtex)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: al_folio_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - al-folio maintainers
@@ -58,7 +58,7 @@ dependencies:
58
58
  version: '2.0'
59
59
  - - "<"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '5.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: '2.0'
69
69
  - - "<"
70
70
  - !ruby/object:Gem::Version
71
- version: '3.0'
71
+ version: '5.0'
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: rake
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 4.0.6
215
+ rubygems_version: 4.0.10
216
216
  specification_version: 4
217
217
  summary: Core runtime plugin for al-folio v1.x
218
218
  test_files: []