jekyll-spaceship 0.8.7 → 0.9.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6ae47db0fb8b3515463a5703cdbfa2c596262066b0af602e3d7f82360872c78
|
|
4
|
+
data.tar.gz: 9f4c96c07fe26d5b1e9a44338375a29470d528e2375902d9e7198cfe377d0b26
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a24363b63096f27c60c92aa0ad37561cf230ae6e61c0e49b7c556e9a584c1ffddc388cf3ab3cb424382351d55a30439628f6a909e93aae4cfce51363f8ffd0f
|
|
7
|
+
data.tar.gz: 297d038c14a9bdb8b856b414eaefba93232ff82518a3c01eaf97ac98f2dd1792d6d875a140e5f30497dbcb759f4e59a6ea6632c64c186f0acacfb249152b2c3e
|
data/README.md
CHANGED
|
@@ -166,12 +166,16 @@ jekyll-spaceship:
|
|
|
166
166
|
- emoji-processor
|
|
167
167
|
- element-processor
|
|
168
168
|
mathjax-processor:
|
|
169
|
-
src:
|
|
169
|
+
src:
|
|
170
|
+
- https://polyfill.io/v3/polyfill.min.js?features=es6
|
|
171
|
+
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
|
|
170
172
|
config:
|
|
171
|
-
|
|
173
|
+
tex:
|
|
172
174
|
inlineMath:
|
|
173
175
|
- ['$','$']
|
|
174
176
|
- ['\(','\)']
|
|
177
|
+
svg:
|
|
178
|
+
fontCache: 'global'
|
|
175
179
|
plantuml-processor:
|
|
176
180
|
mode: default # mode value 'pre-fetch' for fetching image at building stage
|
|
177
181
|
css:
|
|
@@ -160,7 +160,7 @@ module Jekyll::Spaceship
|
|
|
160
160
|
elsif type == :math
|
|
161
161
|
regex = /(((?<!\\)\${1,2})[^\n]*?\1)/
|
|
162
162
|
elsif type == :liquid_filter
|
|
163
|
-
regex = /((?<!\\)\{\{[^\n]*?\}\})/
|
|
163
|
+
regex = /((?<!\\)((\{\{[^\n]*?\}\})|(\{%[^\n]*?%\})))/
|
|
164
164
|
end
|
|
165
165
|
next if regex.nil?
|
|
166
166
|
content.scan(regex) do |match_data|
|
|
@@ -6,9 +6,13 @@ module Jekyll::Spaceship
|
|
|
6
6
|
class MathjaxProcessor < Processor
|
|
7
7
|
def self.config
|
|
8
8
|
{
|
|
9
|
-
'src' =>
|
|
9
|
+
'src' => [
|
|
10
|
+
'https://polyfill.io/v3/polyfill.min.js?features=es6',
|
|
11
|
+
'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js',
|
|
12
|
+
],
|
|
10
13
|
'config' => {
|
|
11
|
-
'
|
|
14
|
+
'tex' => { 'inlineMath' => [['$','$'], ['\\(','\\)']] },
|
|
15
|
+
'svg': { 'fontCache': 'global' }
|
|
12
16
|
}
|
|
13
17
|
}
|
|
14
18
|
end
|
|
@@ -27,8 +31,15 @@ module Jekyll::Spaceship
|
|
|
27
31
|
|
|
28
32
|
self.handled = true
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
# add mathjax config
|
|
35
|
+
cfg = config['config'].to_json
|
|
36
|
+
head.add_child("<script>MathJax=#{cfg}</script>")
|
|
37
|
+
|
|
38
|
+
# add mathjax dependencies
|
|
39
|
+
config['src'] = [config['src']] if config['src'].is_a? String
|
|
40
|
+
config['src'].each do |src|
|
|
41
|
+
head.add_child("<script src=\"#{src}\"></script>")
|
|
42
|
+
end
|
|
32
43
|
|
|
33
44
|
doc.to_html
|
|
34
45
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-spaceship
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jeffreytse
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-08-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|