jekyll-spaceship 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65e9ff74fc3f41dbe577381aee9352d4086282b7f626b7a2c6b0a07dc31b3528
|
4
|
+
data.tar.gz: 623506291192de23202d2e808d0d33b01a7d2834a57d84052732a14ea63b9f11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e98e212490178eec39e3c93773d6320b368dabcdab90657f97a1214e4eff35b47fe32bb4102a9831d4c93a77211c01fe17069dd484f2517f6a1661bb133aa754
|
7
|
+
data.tar.gz: 02a5dca457388cae099933aae86e24915c4b73ea32199a7d89e87e738cc43730e064663940446b21f395f58f74d8ab02b2c38cb87d81a20b92799f0e70a659c3
|
data/README.md
CHANGED
@@ -112,6 +112,7 @@ Spaceship is a minimalistic, powerful and extremely customizable [Jekyll](https:
|
|
112
112
|
- [5.2 Vimeo Usage](#vimeo-usage)
|
113
113
|
- [5.3 DailyMotion Usage](#dailymotion-usage)
|
114
114
|
- [5.4 Spotify Usage](#spotify-usage)
|
115
|
+
- [5.4 Spotify Podcast Usage](#spotify-podcast-usage)
|
115
116
|
- [5.5 SoundCloud Usage](#soundcloud-usage)
|
116
117
|
- [5.6 General Video Usage](#general-video-usage)
|
117
118
|
- [5.7 General Audio Usage](#general-audio-usage)
|
@@ -791,6 +792,15 @@ the link as below:
|
|
791
792
|
|
792
793
|
<image width="600" src="https://user-images.githubusercontent.com/9413601/89762618-5d11b000-db23-11ea-81db-35cc3682b234.png">
|
793
794
|
|
795
|
+
#### Spotify Podcast Usage
|
796
|
+
|
797
|
+
```markdown
|
798
|
+
![](https://open.spotify.com/episode/31AxcwYdjsFtStds5JVWbT)
|
799
|
+
```
|
800
|
+
|
801
|
+
<image width="600" src="https://user-images.githubusercontent.com/9413601/133599796-1d213033-8184-4059-9ec2-5415e50c94dc.png">
|
802
|
+
|
803
|
+
|
794
804
|
#### SoundCloud Usage
|
795
805
|
|
796
806
|
```markdown
|
@@ -45,6 +45,7 @@ module Jekyll::Spaceship
|
|
45
45
|
escaped_expr = expr
|
46
46
|
.gsub(/(?<!^)\\(?!\S$)/, '\\\\\\\\')
|
47
47
|
.gsub(/(?<!\\)\$\$/, '\\\$\\\$')
|
48
|
+
.gsub(/\\\\(?=\s)/, '\\\\\\\\\\')
|
48
49
|
.gsub(/\\ /, '\\\\\\ ')
|
49
50
|
content = content.gsub(expr, escaped_expr)
|
50
51
|
end
|
@@ -92,7 +93,7 @@ module Jekyll::Spaceship
|
|
92
93
|
r&.each do |i|
|
93
94
|
btag = Regexp.escape(i[0])
|
94
95
|
etag = Regexp.escape(i[1])
|
95
|
-
patterns <<= /((?<!\\\\)#{btag}(
|
96
|
+
patterns <<= /((?<!\\\\)#{btag}([\s\S]*?)(?<!\\\\)#{etag})/
|
96
97
|
end
|
97
98
|
end
|
98
99
|
end
|
@@ -122,6 +123,19 @@ module Jekyll::Spaceship
|
|
122
123
|
|
123
124
|
# scan mathjax expressions
|
124
125
|
doc.css('body *').each do |node|
|
126
|
+
# filter invalid nodes
|
127
|
+
next if node.children.size == 0
|
128
|
+
invalid = false
|
129
|
+
node.children.each do |child|
|
130
|
+
unless [
|
131
|
+
'text', 'br', 'span',
|
132
|
+
'img', 'svg', 'a'
|
133
|
+
].include? child.name
|
134
|
+
break invalid = true
|
135
|
+
end
|
136
|
+
end
|
137
|
+
next if invalid
|
138
|
+
|
125
139
|
patterns['include'].each do |pattern|
|
126
140
|
# check normal mathjax expression
|
127
141
|
node.content.scan(pattern) do |result|
|
@@ -30,6 +30,7 @@ module Jekyll::Spaceship
|
|
30
30
|
handle_vimeo(element)
|
31
31
|
handle_dailymotion(element)
|
32
32
|
handle_spotify(element)
|
33
|
+
handle_spotify_podcast(element)
|
33
34
|
handle_soundcloud(element)
|
34
35
|
end
|
35
36
|
doc.to_html
|
@@ -109,6 +110,19 @@ module Jekyll::Spaceship
|
|
109
110
|
})
|
110
111
|
end
|
111
112
|
|
113
|
+
# Examples:
|
114
|
+
# ![spotify podcast](//open.spotify.com/episode/31AxcwYdjsFtStds5JVWbT)
|
115
|
+
# ![spotify podcast](//open.spotify.com/episode/44gfWHnwbmSY7Euw6Nb39k?width=400)
|
116
|
+
def handle_spotify_podcast(element)
|
117
|
+
handle_media(element, {
|
118
|
+
media_type: 'iframe',
|
119
|
+
host: '(https?:)?\\/\\/open\\.spotify\\.com\\/episode\\/',
|
120
|
+
id: '(?<=episode\\/)([a-zA-Z0-9\\_\\-]+)',
|
121
|
+
base_url: "https://open.spotify.com/embed/episode/",
|
122
|
+
height: 152
|
123
|
+
})
|
124
|
+
end
|
125
|
+
|
112
126
|
# Examples:
|
113
127
|
# ![soundcloud](//soundcloud.com/aviciiofficial/preview-avicii-vs-lenny)
|
114
128
|
def handle_soundcloud(element)
|
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.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeffreytse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|