jekyll_miscellaneous 1.2.0 → 1.4.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 +4 -4
- data/.github/workflows/test.yml +28 -0
- data/Gemfile.lock +31 -25
- data/lib/jekyll_miscellaneous/hooks/external_links.rb +0 -1
- data/lib/jekyll_miscellaneous/hooks/mark.rb +1 -1
- data/lib/jekyll_miscellaneous/tags/you_tube.rb +14 -5
- data/lib/jekyll_miscellaneous/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50e34a6dd7d26122d796bd7bf65ee71d3643900e7473330c51834406e71f4efc
|
4
|
+
data.tar.gz: defdad71a1e490e4c75406a504448bd3dfcd7434a18c0c4c54e092c776045194
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86f93b8e6994d759f7b73a249bcba0405f872358eac1d74bdbc26680cd91cd815a130141383b49ca27289a4a27a84bc0f0b2177d7cd87b424b086e07fab1e369
|
7
|
+
data.tar.gz: b08daca44dd3c219450e8143d647356a38a83a0e2b6b345cfb303ff037973467201ca07130bb6de09f4dd6969392a7ad413b89159c0b8878bdf221868e32b1f8
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- name: Checkout code
|
17
|
+
uses: actions/checkout@v3
|
18
|
+
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: '3.1'
|
23
|
+
|
24
|
+
- name: Install dependencies
|
25
|
+
run: bundle install
|
26
|
+
|
27
|
+
- name: Run tests
|
28
|
+
run: bundle exec rspec
|
data/Gemfile.lock
CHANGED
@@ -1,77 +1,82 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jekyll_miscellaneous (1.0
|
4
|
+
jekyll_miscellaneous (1.3.0)
|
5
5
|
jekyll (~> 4.0)
|
6
6
|
nokogiri (~> 1.13)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.8.
|
12
|
-
public_suffix (>= 2.0.2, <
|
11
|
+
addressable (2.8.6)
|
12
|
+
public_suffix (>= 2.0.2, < 6.0)
|
13
13
|
ansi (1.5.0)
|
14
14
|
ast (2.4.2)
|
15
|
+
bigdecimal (3.1.8)
|
15
16
|
codecov (0.6.0)
|
16
17
|
simplecov (>= 0.15, < 0.22)
|
17
18
|
colorator (1.1.0)
|
18
|
-
concurrent-ruby (1.1
|
19
|
+
concurrent-ruby (1.3.1)
|
19
20
|
diff-lcs (1.5.0)
|
20
21
|
docile (1.4.0)
|
21
22
|
em-websocket (0.5.3)
|
22
23
|
eventmachine (>= 0.12.9)
|
23
24
|
http_parser.rb (~> 0)
|
24
25
|
eventmachine (1.2.7)
|
25
|
-
ffi (1.
|
26
|
+
ffi (1.16.3)
|
26
27
|
forwardable-extended (2.6.0)
|
28
|
+
google-protobuf (4.27.0-x86_64-linux)
|
29
|
+
bigdecimal
|
30
|
+
rake (>= 13)
|
27
31
|
http_parser.rb (0.8.0)
|
28
|
-
i18n (1.
|
32
|
+
i18n (1.14.5)
|
29
33
|
concurrent-ruby (~> 1.0)
|
30
|
-
jekyll (4.
|
34
|
+
jekyll (4.3.3)
|
31
35
|
addressable (~> 2.4)
|
32
36
|
colorator (~> 1.0)
|
33
37
|
em-websocket (~> 0.5)
|
34
38
|
i18n (~> 1.0)
|
35
|
-
jekyll-sass-converter (
|
39
|
+
jekyll-sass-converter (>= 2.0, < 4.0)
|
36
40
|
jekyll-watch (~> 2.0)
|
37
|
-
kramdown (~> 2.3)
|
41
|
+
kramdown (~> 2.3, >= 2.3.1)
|
38
42
|
kramdown-parser-gfm (~> 1.0)
|
39
43
|
liquid (~> 4.0)
|
40
|
-
mercenary (
|
44
|
+
mercenary (>= 0.3.6, < 0.5)
|
41
45
|
pathutil (~> 0.9)
|
42
|
-
rouge (
|
46
|
+
rouge (>= 3.0, < 5.0)
|
43
47
|
safe_yaml (~> 1.0)
|
44
|
-
terminal-table (
|
45
|
-
|
46
|
-
|
48
|
+
terminal-table (>= 1.8, < 4.0)
|
49
|
+
webrick (~> 1.7)
|
50
|
+
jekyll-sass-converter (3.0.0)
|
51
|
+
sass-embedded (~> 1.54)
|
47
52
|
jekyll-watch (2.2.1)
|
48
53
|
listen (~> 3.0)
|
49
|
-
kramdown (2.
|
54
|
+
kramdown (2.4.0)
|
50
55
|
rexml
|
51
56
|
kramdown-parser-gfm (1.1.0)
|
52
57
|
kramdown (~> 2.0)
|
53
|
-
liquid (4.0.
|
54
|
-
listen (3.
|
58
|
+
liquid (4.0.4)
|
59
|
+
listen (3.9.0)
|
55
60
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
56
61
|
rb-inotify (~> 0.9, >= 0.9.10)
|
57
62
|
mercenary (0.4.0)
|
58
|
-
nokogiri (1.
|
63
|
+
nokogiri (1.16.5-x86_64-linux)
|
59
64
|
racc (~> 1.4)
|
60
65
|
parallel (1.21.0)
|
61
66
|
parser (3.1.0.0)
|
62
67
|
ast (~> 2.4.1)
|
63
68
|
pathutil (0.16.2)
|
64
69
|
forwardable-extended (~> 2.6)
|
65
|
-
public_suffix (
|
66
|
-
racc (1.
|
70
|
+
public_suffix (5.0.5)
|
71
|
+
racc (1.8.0)
|
67
72
|
rainbow (3.1.1)
|
68
73
|
rake (13.0.6)
|
69
|
-
rb-fsevent (0.11.
|
70
|
-
rb-inotify (0.
|
74
|
+
rb-fsevent (0.11.2)
|
75
|
+
rb-inotify (0.11.1)
|
71
76
|
ffi (~> 1.0)
|
72
77
|
regexp_parser (2.2.1)
|
73
78
|
rexml (3.2.5)
|
74
|
-
rouge (
|
79
|
+
rouge (4.2.1)
|
75
80
|
rspec (3.11.0)
|
76
81
|
rspec-core (~> 3.11.0)
|
77
82
|
rspec-expectations (~> 3.11.0)
|
@@ -103,8 +108,8 @@ GEM
|
|
103
108
|
rubocop (~> 1.19)
|
104
109
|
ruby-progressbar (1.11.0)
|
105
110
|
safe_yaml (1.0.5)
|
106
|
-
|
107
|
-
|
111
|
+
sass-embedded (1.77.4-x86_64-linux-gnu)
|
112
|
+
google-protobuf (>= 3.25, < 5.0)
|
108
113
|
simplecov (0.21.2)
|
109
114
|
docile (~> 1.1)
|
110
115
|
simplecov-html (~> 0.11)
|
@@ -118,6 +123,7 @@ GEM
|
|
118
123
|
terminal-table (2.0.0)
|
119
124
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
120
125
|
unicode-display_width (1.8.0)
|
126
|
+
webrick (1.8.1)
|
121
127
|
|
122
128
|
PLATFORMS
|
123
129
|
x86_64-linux
|
@@ -67,7 +67,6 @@ module JekyllMiscellaneous
|
|
67
67
|
next unless /\Ahttp/i.match?(a.get_attribute('href'))
|
68
68
|
next if %r{\Ahttp(s)?://#{site_hostname}}i.match?(a.get_attribute('href'))
|
69
69
|
|
70
|
-
a.set_attribute('rel', 'external')
|
71
70
|
a.set_attribute('target', '_blank')
|
72
71
|
a.set_attribute('rel', 'noopener')
|
73
72
|
|
@@ -8,13 +8,15 @@ module JekyllMiscellaneous
|
|
8
8
|
# == Parameters:
|
9
9
|
# tag_name::
|
10
10
|
# The name of the tag.
|
11
|
-
#
|
12
|
-
# The
|
11
|
+
# markup::
|
12
|
+
# The markup inside the tag.
|
13
13
|
# tokens::
|
14
14
|
# The tokens to parse.
|
15
|
-
def initialize(tag_name,
|
15
|
+
def initialize(tag_name, markup, tokens)
|
16
16
|
super
|
17
|
-
|
17
|
+
args = markup.split
|
18
|
+
@id = args[0].strip
|
19
|
+
@use_nocookie = args[1] && args[1].strip.downcase == 'nocookie'
|
18
20
|
end
|
19
21
|
|
20
22
|
# Render the YouTube tag.
|
@@ -25,8 +27,15 @@ module JekyllMiscellaneous
|
|
25
27
|
# == Example:
|
26
28
|
# {% youtube "dQw4w9WgXcQ" %}
|
27
29
|
# <div class="youtube-container"><iframe src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ"></iframe></div>
|
30
|
+
#
|
31
|
+
# {% youtube "dQw4w9WgXcQ" nocookie %}
|
32
|
+
# <div class="youtube-container"><iframe src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ"></iframe></div>
|
33
|
+
#
|
34
|
+
# {% youtube "dQw4w9WgXcQ" normal %}
|
35
|
+
# <div class="youtube-container"><iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ"></iframe></div>
|
28
36
|
def render(_context)
|
29
|
-
|
37
|
+
domain = @use_nocookie ? "www.youtube-nocookie.com" : "www.youtube.com"
|
38
|
+
"<div class='youtube-container'><iframe src=\"https://#{domain}/embed/#{@id}\"></iframe></div>"
|
30
39
|
end
|
31
40
|
end
|
32
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_miscellaneous
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro AR
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -157,6 +157,7 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
+
- ".github/workflows/test.yml"
|
160
161
|
- ".gitignore"
|
161
162
|
- ".rubocop.yml"
|
162
163
|
- Gemfile
|
@@ -194,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
195
|
- !ruby/object:Gem::Version
|
195
196
|
version: '0'
|
196
197
|
requirements: []
|
197
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.5.22
|
198
199
|
signing_key:
|
199
200
|
specification_version: 4
|
200
201
|
summary: A collection of opinionated plugins for Jekyll.
|