al_math 0.1.0 → 1.0.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +26 -4
- data/lib/al_math.rb +19 -4
- metadata +8 -10
- 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: a68223faa1bd25cfbfc5db72387a013e8b378e061265137435ac7bd749dae267
|
|
4
|
+
data.tar.gz: f58f52c6bd4fd62db1919197f62627f51d65c8ef5cfc56588da1a6a06c7970b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 298460b685f29ba97e9397d3d68fc79cf654d1ead4dc9c6494018cbdf36798d26e119950dca9c9bf2e6b3399ef2ccfeb9d0cfef35bb3b27fce545eaf99b3025a
|
|
7
|
+
data.tar.gz: 207b9d0ceb647b646149f733e8ca0028bc9bcddaa75ab200848121636074175cf51155571f14c5418ebffe4ecb8bf6df9f9a1d82ae2ffac2ef6102832e046df8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2 - 2026-07-24
|
|
4
|
+
|
|
5
|
+
### Security / hygiene
|
|
6
|
+
|
|
7
|
+
- Stopped emitting the `polyfill.io` (`es6`) `<script>` from the MathJax path. The polyfill.io service was taken over in a June 2024 supply-chain attack and is unnecessary for MathJax 3 on modern browsers. The tag no longer reads `third_party_libraries.polyfill`, so the corresponding starter `_config.yml` entry can be dropped as follow-up cleanup.
|
|
8
|
+
|
|
9
|
+
## 1.0.1 - 2026-02-17
|
|
10
|
+
|
|
11
|
+
- Switched TikZJax CSS/JS loading from vendored plugin files to pinned CDN URLs in `third_party_libraries.tikzjax`.
|
|
12
|
+
- Removed bundled TikZJax assets from the gem package.
|
|
13
|
+
|
|
3
14
|
## 0.1.0 - 2026-02-07
|
|
15
|
+
|
|
4
16
|
- Initial gem release.
|
|
5
17
|
- Added standalone math script/style tags and assets (MathJax, pseudocode, TikZJax).
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# al-math
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`al_math` provides math runtime loading for `al-folio` v1.x.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,8 +8,6 @@ A Jekyll plugin that provides math-related assets and script loading.
|
|
|
8
8
|
gem 'al_math'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Enable in `_config.yml`:
|
|
12
|
-
|
|
13
11
|
```yaml
|
|
14
12
|
plugins:
|
|
15
13
|
- al_math
|
|
@@ -17,7 +15,31 @@ plugins:
|
|
|
17
15
|
|
|
18
16
|
## Usage
|
|
19
17
|
|
|
18
|
+
Render assets:
|
|
19
|
+
|
|
20
20
|
```liquid
|
|
21
21
|
{% al_math_styles %}
|
|
22
22
|
{% al_math_scripts %}
|
|
23
23
|
```
|
|
24
|
+
|
|
25
|
+
TikZJax runtime is loaded from CDN config 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
|
+
```
|
|
37
|
+
|
|
38
|
+
## Ecosystem context
|
|
39
|
+
|
|
40
|
+
- Starter wiring/docs live in `al-folio`.
|
|
41
|
+
- Math runtime ownership lives in this plugin.
|
|
42
|
+
|
|
43
|
+
## Contributing
|
|
44
|
+
|
|
45
|
+
Math runtime provider/config behavior changes should be proposed in this repository.
|
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
|
|
@@ -57,12 +65,19 @@ module AlMath
|
|
|
57
65
|
out << %(<script type="text/javascript" src="#{libs.dig('pseudocode', 'url', 'js')}" integrity="#{libs.dig('pseudocode', 'integrity', 'js')}" crossorigin="anonymous"></script>)
|
|
58
66
|
else
|
|
59
67
|
out << %(<script src="#{baseurl}/assets/al_math/js/mathjax-setup.js"></script>)
|
|
60
|
-
out << %(<script defer src="#{libs.dig('polyfill', 'url', 'js')}" crossorigin="anonymous"></script>)
|
|
61
68
|
end
|
|
62
69
|
end
|
|
63
70
|
|
|
64
71
|
if truthy?(page['tikzjax'])
|
|
65
|
-
|
|
72
|
+
tikz_js = libs.dig('tikzjax', 'url', 'js')
|
|
73
|
+
tikz_integrity = libs.dig('tikzjax', 'integrity', 'js')
|
|
74
|
+
if !tikz_js.to_s.empty?
|
|
75
|
+
if tikz_integrity.to_s.empty?
|
|
76
|
+
out << %(<script defer src="#{tikz_js}" type="text/javascript" crossorigin="anonymous"></script>)
|
|
77
|
+
else
|
|
78
|
+
out << %(<script defer src="#{tikz_js}" type="text/javascript" integrity="#{tikz_integrity}" crossorigin="anonymous"></script>)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
66
81
|
end
|
|
67
82
|
|
|
68
83
|
out.join("\n")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: al_math
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- al-org
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -59,7 +59,7 @@ dependencies:
|
|
|
59
59
|
version: '2.0'
|
|
60
60
|
- - "<"
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: '
|
|
62
|
+
version: '5.0'
|
|
63
63
|
type: :development
|
|
64
64
|
prerelease: false
|
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -69,7 +69,7 @@ dependencies:
|
|
|
69
69
|
version: '2.0'
|
|
70
70
|
- - "<"
|
|
71
71
|
- !ruby/object:Gem::Version
|
|
72
|
-
version: '
|
|
72
|
+
version: '5.0'
|
|
73
73
|
- !ruby/object:Gem::Dependency
|
|
74
74
|
name: rake
|
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -96,10 +96,8 @@ files:
|
|
|
96
96
|
- LICENSE
|
|
97
97
|
- README.md
|
|
98
98
|
- lib/al_math.rb
|
|
99
|
-
- lib/assets/al_math/css/tikzjax.min.css
|
|
100
99
|
- lib/assets/al_math/js/mathjax-setup.js
|
|
101
100
|
- lib/assets/al_math/js/pseudocode-setup.js
|
|
102
|
-
- lib/assets/al_math/js/tikzjax.min.js
|
|
103
101
|
homepage: https://github.com/al-org-dev/al-math
|
|
104
102
|
licenses:
|
|
105
103
|
- MIT
|
|
@@ -107,7 +105,7 @@ metadata:
|
|
|
107
105
|
allowed_push_host: https://rubygems.org
|
|
108
106
|
homepage_uri: https://github.com/al-org-dev/al-math
|
|
109
107
|
source_code_uri: https://github.com/al-org-dev/al-math
|
|
110
|
-
post_install_message:
|
|
108
|
+
post_install_message:
|
|
111
109
|
rdoc_options: []
|
|
112
110
|
require_paths:
|
|
113
111
|
- lib
|
|
@@ -122,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
122
120
|
- !ruby/object:Gem::Version
|
|
123
121
|
version: '0'
|
|
124
122
|
requirements: []
|
|
125
|
-
rubygems_version: 3.
|
|
126
|
-
signing_key:
|
|
123
|
+
rubygems_version: 3.5.22
|
|
124
|
+
signing_key:
|
|
127
125
|
specification_version: 4
|
|
128
126
|
summary: Math rendering assets and tags for Jekyll
|
|
129
127
|
test_files: []
|