al_math 0.1.0 → 1.0.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +13 -0
- data/lib/al_math.rb +19 -3
- metadata +3 -8
- data/lib/assets/al_math/css/tikzjax.min.css +0 -700
- data/lib/assets/al_math/js/tikzjax.min.js +0 -4413
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2fbc350fe4a31d0dc12a0c8240ab2e56fc2021660cf7139f96935fd049ddf88
|
|
4
|
+
data.tar.gz: 1f3fd9bb5bfde5e39880283fd05f0155fbe60ed2e2b216fe046ba4d745b1c6b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58e44cd6b7fcac77bb53ea8299b45616b5c331ffe2da7b8b5dfb63dbe520912f5d961bf342090f44df2960e6ae10a6a0d49acaf52069a33d1ffb407e403808c3
|
|
7
|
+
data.tar.gz: 1fb3819ff86b39ea758f3bc995e360d3fde7e12cefc3e43beb8267d098fbe7046f3926c336b9932abc6fc1fb29c048445a01aa635f0748732892dc93ef19141e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.1 - 2026-02-17
|
|
4
|
+
|
|
5
|
+
- Switched TikZJax CSS/JS loading from vendored plugin files to pinned CDN URLs in `third_party_libraries.tikzjax`.
|
|
6
|
+
- Removed bundled TikZJax assets from the gem package.
|
|
7
|
+
|
|
3
8
|
## 0.1.0 - 2026-02-07
|
|
9
|
+
|
|
4
10
|
- Initial gem release.
|
|
5
11
|
- Added standalone math script/style tags and assets (MathJax, pseudocode, TikZJax).
|
data/README.md
CHANGED
|
@@ -21,3 +21,16 @@ plugins:
|
|
|
21
21
|
{% al_math_styles %}
|
|
22
22
|
{% al_math_scripts %}
|
|
23
23
|
```
|
|
24
|
+
|
|
25
|
+
TikZJax runtime assets are loaded from `third_party_libraries.tikzjax` when a page sets `tikzjax: true`.
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
third_party_libraries:
|
|
29
|
+
tikzjax:
|
|
30
|
+
url:
|
|
31
|
+
css: https://cdn.jsdelivr.net/npm/@planktimerr/tikzjax@1.0.8/dist/fonts.css
|
|
32
|
+
js: https://cdn.jsdelivr.net/npm/@planktimerr/tikzjax@1.0.8/dist/tikzjax.js
|
|
33
|
+
integrity:
|
|
34
|
+
css: <optional-sri-hash>
|
|
35
|
+
js: <optional-sri-hash>
|
|
36
|
+
```
|
data/lib/al_math.rb
CHANGED
|
@@ -28,8 +28,16 @@ module AlMath
|
|
|
28
28
|
return '' unless site
|
|
29
29
|
return '' unless truthy?(page['tikzjax'])
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
libs = site.config['third_party_libraries'] || {}
|
|
32
|
+
tikz_css = libs.dig('tikzjax', 'url', 'css')
|
|
33
|
+
return '' if tikz_css.to_s.empty?
|
|
34
|
+
|
|
35
|
+
tikz_integrity = libs.dig('tikzjax', 'integrity', 'css')
|
|
36
|
+
if tikz_integrity.to_s.empty?
|
|
37
|
+
%(<link defer rel="stylesheet" type="text/css" href="#{tikz_css}" crossorigin="anonymous">)
|
|
38
|
+
else
|
|
39
|
+
%(<link defer rel="stylesheet" type="text/css" href="#{tikz_css}" integrity="#{tikz_integrity}" crossorigin="anonymous">)
|
|
40
|
+
end
|
|
33
41
|
end
|
|
34
42
|
|
|
35
43
|
private
|
|
@@ -62,7 +70,15 @@ module AlMath
|
|
|
62
70
|
end
|
|
63
71
|
|
|
64
72
|
if truthy?(page['tikzjax'])
|
|
65
|
-
|
|
73
|
+
tikz_js = libs.dig('tikzjax', 'url', 'js')
|
|
74
|
+
tikz_integrity = libs.dig('tikzjax', 'integrity', 'js')
|
|
75
|
+
if !tikz_js.to_s.empty?
|
|
76
|
+
if tikz_integrity.to_s.empty?
|
|
77
|
+
out << %(<script defer src="#{tikz_js}" type="text/javascript" crossorigin="anonymous"></script>)
|
|
78
|
+
else
|
|
79
|
+
out << %(<script defer src="#{tikz_js}" type="text/javascript" integrity="#{tikz_integrity}" crossorigin="anonymous"></script>)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
66
82
|
end
|
|
67
83
|
|
|
68
84
|
out.join("\n")
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: al_math
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- al-org
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: jekyll
|
|
@@ -96,10 +95,8 @@ files:
|
|
|
96
95
|
- LICENSE
|
|
97
96
|
- README.md
|
|
98
97
|
- lib/al_math.rb
|
|
99
|
-
- lib/assets/al_math/css/tikzjax.min.css
|
|
100
98
|
- lib/assets/al_math/js/mathjax-setup.js
|
|
101
99
|
- lib/assets/al_math/js/pseudocode-setup.js
|
|
102
|
-
- lib/assets/al_math/js/tikzjax.min.js
|
|
103
100
|
homepage: https://github.com/al-org-dev/al-math
|
|
104
101
|
licenses:
|
|
105
102
|
- MIT
|
|
@@ -107,7 +104,6 @@ metadata:
|
|
|
107
104
|
allowed_push_host: https://rubygems.org
|
|
108
105
|
homepage_uri: https://github.com/al-org-dev/al-math
|
|
109
106
|
source_code_uri: https://github.com/al-org-dev/al-math
|
|
110
|
-
post_install_message:
|
|
111
107
|
rdoc_options: []
|
|
112
108
|
require_paths:
|
|
113
109
|
- lib
|
|
@@ -122,8 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
122
118
|
- !ruby/object:Gem::Version
|
|
123
119
|
version: '0'
|
|
124
120
|
requirements: []
|
|
125
|
-
rubygems_version:
|
|
126
|
-
signing_key:
|
|
121
|
+
rubygems_version: 4.0.6
|
|
127
122
|
specification_version: 4
|
|
128
123
|
summary: Math rendering assets and tags for Jekyll
|
|
129
124
|
test_files: []
|