jekyll-spaceship 0.6.2 → 0.6.3
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: 8df3e5c04610d7f6ae766303a8b884e1b3bd0047f72ac489275dd26d133d392a
|
4
|
+
data.tar.gz: '0728453eaace46c6d88aa0395f1d17ae88c17a727aa3be9b10236c222fc3d85e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b5e65d14b80d87ebb06b9e3c5cc7c71f6d654940d58034ab314d232d5ff6614bd3b22649259d3658690b5e94b5c4e6983214a0b3e4bdd91cd03e7702901a51e
|
7
|
+
data.tar.gz: f7a171a023c65ceb729ade833fe7193b05000aa24483c1bd0bc6201c28df47f69d503aa2612a866aba1627fc86626f63d38b7db41b8d75a616805b14f1d71fff
|
data/README.md
CHANGED
@@ -80,10 +80,10 @@
|
|
80
80
|
<br>
|
81
81
|
|
82
82
|
|
83
|
-
|
83
|
+
Spaceship is a minimalistic, powerful and extremely customizable [Jekyll](https://jekyllrb.com/) plugin. It combines everything you may need for convenient work, without unnecessary complications, like a real spaceship.
|
84
84
|
|
85
85
|
<p align="center">
|
86
|
-
<img alt="Jekyll Spaceship Demo" src="https://user-images.githubusercontent.com/9413601/82250463-15451780-997e-11ea-8809-f411586d9508.gif"
|
86
|
+
<img alt="Jekyll Spaceship Demo" src="https://user-images.githubusercontent.com/9413601/82250463-15451780-997e-11ea-8809-f411586d9508.gif" />
|
87
87
|
</p>
|
88
88
|
|
89
89
|
**💡 Tip:** I hope you enjoy using this plugin. If you like this project, **a little star** for it is your way make a clear statement: **My work is valued**. I would appreciate your support! _Thank you!_
|
@@ -109,10 +109,12 @@ A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, emoji
|
|
109
109
|
- [4.1 Youtube Usage](#youtube-usage)
|
110
110
|
- [4.2 Vimeo Usage](#vimeo-usage)
|
111
111
|
- [4.3 DailyMotion Usage](#dailymotion-usage)
|
112
|
+
- [4.4 General Video Usage](#general-video-usage)
|
112
113
|
- [5. Hybrid HTML with Markdown](#5-hybrid-html-with-markdown)
|
113
114
|
- [6. Markdown Polyfill](#6-markdown-polyfill)
|
114
115
|
- [6.1 Escape Ordered List](#escape-ordered-list)
|
115
116
|
- [7. Emoji Usage](#7-emoji-usage)
|
117
|
+
- [7.1 Emoji Customizing](#71-emoji-customizing)
|
116
118
|
- [Credits](#credits)
|
117
119
|
- [Contributing](#contributing)
|
118
120
|
- [License](#license)
|
@@ -576,6 +578,7 @@ While its not possible to embed a video in markdown, the best and easiest way is
|
|
576
578
|
- Youtube
|
577
579
|
- Vimeo
|
578
580
|
- DailyMotion
|
581
|
+
- General Video ( mp4 | avi | webm | ogg | ogv | 3gp | flv | mov ... )
|
579
582
|
|
580
583
|
There are two ways to embed a video in your Jekyll blog page:
|
581
584
|
|
@@ -634,6 +637,21 @@ the link as below:
|
|
634
637
|
![](https://dai.ly/x7tgcev?width=100%&height=400)
|
635
638
|
```
|
636
639
|
|
640
|
+
#### General Video Usage
|
641
|
+
|
642
|
+
```markdown
|
643
|
+
![](//www.html5rocks.com/en/tutorials/video/basics/devstories.webm)
|
644
|
+
```
|
645
|
+
|
646
|
+
```markdown
|
647
|
+
![](//techslides.com/demos/sample-videos/small.ogv?allow=autoplay)
|
648
|
+
```
|
649
|
+
|
650
|
+
```markdown
|
651
|
+
![](//techslides.com/demos/sample-videos/small.mp4?width=400)
|
652
|
+
```
|
653
|
+
|
654
|
+
|
637
655
|
### 5. Hybrid HTML with Markdown
|
638
656
|
|
639
657
|
As markdown is not only a lightweight markup language with plain-text-formatting syntax, but also an easy-to-read and easy-to-write plain text format, so writing a hybrid HTML with markdown is an awesome choice.
|
@@ -725,6 +743,19 @@ I give this plugin two :+1:!
|
|
725
743
|
|
726
744
|
I give this plugin two :+1:!
|
727
745
|
|
746
|
+
#### 7.1 Emoji Customizing
|
747
|
+
|
748
|
+
If you'd like to serve emoji images locally, or use a custom emoji source, you can specify so in your `_config.yml` file:
|
749
|
+
|
750
|
+
```yml
|
751
|
+
jekyll-spaceship:
|
752
|
+
emoji-processor:
|
753
|
+
src: "/assets/images/emoji"
|
754
|
+
```
|
755
|
+
|
756
|
+
See the [Gemoji](https://github.com/github/gemoji) documentation for generating image files.
|
757
|
+
|
758
|
+
|
728
759
|
## Credits
|
729
760
|
|
730
761
|
- [Jekyll](https://github.com/jekyll/jekyll) - A blog-aware static site generator in Ruby.
|
@@ -156,13 +156,13 @@ module Jekyll::Spaceship
|
|
156
156
|
@exclusions.each do |type|
|
157
157
|
regex = nil
|
158
158
|
if type == :code
|
159
|
-
regex = /(
|
159
|
+
regex = /((`+)\s*(\w*)((?:.|\n)*?)\2)/
|
160
160
|
end
|
161
161
|
next if regex.nil?
|
162
162
|
content.scan(regex) do |match_data|
|
163
163
|
match = match_data[0]
|
164
164
|
id = @exclusion_store.size
|
165
|
-
content = content.
|
165
|
+
content = content.sub(match, "[JEKYLL@#{object_id}@#{id}]")
|
166
166
|
@exclusion_store.push match
|
167
167
|
end
|
168
168
|
end
|
@@ -173,7 +173,7 @@ module Jekyll::Spaceship
|
|
173
173
|
while @exclusion_store.size > 0
|
174
174
|
match = @exclusion_store.pop
|
175
175
|
id = @exclusion_store.size
|
176
|
-
content = content.
|
176
|
+
content = content.sub("[JEKYLL@#{object_id}@#{id}]", match)
|
177
177
|
end
|
178
178
|
@exclusion_store = []
|
179
179
|
content
|
@@ -7,21 +7,30 @@ module Jekyll::Spaceship
|
|
7
7
|
class PlantumlProcessor < Processor
|
8
8
|
exclude :none
|
9
9
|
|
10
|
+
PLANTUML_PATTERNS = [
|
11
|
+
/(\\?(@startuml)((?:.|\n)*?)@enduml)/,
|
12
|
+
/((`{3,})\s*plantuml((?:.|\n)*?)\2)/
|
13
|
+
]
|
14
|
+
|
10
15
|
def self.config
|
11
16
|
{ 'src' => 'http://www.plantuml.com/plantuml/png/' }
|
12
17
|
end
|
13
18
|
|
14
19
|
def on_handle_markdown(content)
|
15
20
|
# match default plantuml block and code block
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
)
|
21
|
+
PLANTUML_PATTERNS.each do |pattern|
|
22
|
+
content = handle_plantuml_block(pattern, content)
|
23
|
+
end
|
20
24
|
|
25
|
+
# handle escape default plantuml block
|
26
|
+
content.gsub(/\\(@startuml|@enduml)/, '\1')
|
27
|
+
end
|
28
|
+
|
29
|
+
def handle_plantuml_block(pattern, content)
|
21
30
|
content.scan pattern do |match|
|
22
31
|
match = match.select { |m| not m.nil? }
|
23
32
|
block = match[0]
|
24
|
-
code = match[
|
33
|
+
code = match[2]
|
25
34
|
|
26
35
|
# skip escape default plantuml block
|
27
36
|
if block.match(/(^\\@startuml|\\@enduml$)/)
|
@@ -35,9 +44,7 @@ module Jekyll::Spaceship
|
|
35
44
|
handle_plantuml(code)
|
36
45
|
)
|
37
46
|
end
|
38
|
-
|
39
|
-
# handle escape default plantuml block
|
40
|
-
content.gsub(/\\(@startuml|@enduml)/, '\1')
|
47
|
+
content
|
41
48
|
end
|
42
49
|
|
43
50
|
def handle_plantuml(code)
|
@@ -92,7 +92,7 @@ module Jekyll::Spaceship
|
|
92
92
|
width = qs['width'] || data[:width] || "100%"
|
93
93
|
height = qs['height'] || data[:height] || 350
|
94
94
|
frameborder = qs['frameborder'] || 0
|
95
|
-
style = qs['style'] || ''
|
95
|
+
style = qs['style'] || 'max-width: 600px'
|
96
96
|
allow = qs['allow'] || "encrypted-media; picture-in-picture"
|
97
97
|
|
98
98
|
url = URI(iframe_url ? "#{iframe_url}#{id}" : url).tap do |v|
|