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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43e34c0520f0e49da93cf8b93e47da9b7b92e69bc8418425a15cf7aef39c6ece
4
- data.tar.gz: 4b595e1541f7bbacaf893b1ed96ef6938ffb4418cc7762f25f1b90fc8f8a57ad
3
+ metadata.gz: 50e34a6dd7d26122d796bd7bf65ee71d3643900e7473330c51834406e71f4efc
4
+ data.tar.gz: defdad71a1e490e4c75406a504448bd3dfcd7434a18c0c4c54e092c776045194
5
5
  SHA512:
6
- metadata.gz: bd680ce6924ab244f949c96fe387dc0ab0c22eac4085dd53f14ba59beb1166f2162eddb9c8c1d17e3d5bab0e70bf8addf934d18b0b73bd877ff0aa6a823f120d
7
- data.tar.gz: b85b037667710547bd2d8271a3d208755046b813e4f57000ac60baec9363a9dc8ab05fc7417cbe4bb3f5c91e0311a6600f8fd1d818b3db68311da26645236c74
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.1)
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.0)
12
- public_suffix (>= 2.0.2, < 5.0)
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.9)
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.15.5)
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.9.1)
32
+ i18n (1.14.5)
29
33
  concurrent-ruby (~> 1.0)
30
- jekyll (4.2.1)
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 (~> 2.0)
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 (~> 0.4.0)
44
+ mercenary (>= 0.3.6, < 0.5)
41
45
  pathutil (~> 0.9)
42
- rouge (~> 3.0)
46
+ rouge (>= 3.0, < 5.0)
43
47
  safe_yaml (~> 1.0)
44
- terminal-table (~> 2.0)
45
- jekyll-sass-converter (2.1.0)
46
- sassc (> 2.0.1, < 3.0)
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.3.1)
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.3)
54
- listen (3.7.1)
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.13.1-x86_64-linux)
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 (4.0.6)
66
- racc (1.6.0)
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.1)
70
- rb-inotify (0.10.1)
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 (3.28.0)
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
- sassc (2.4.0)
107
- ffi (~> 1.9)
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
 
@@ -17,7 +17,7 @@ module JekyllMiscellaneous
17
17
  # =='Hello, World!'==
18
18
  # <mark>Hello, World!</mark>
19
19
  def self.process(doc)
20
- doc.content.gsub!(/==+(\w(.*?)?[^ .=]?)==+/, '<mark>\\1</mark>')
20
+ doc.content.gsub!(/==+([^=]+)==+/, '<mark>\\1</mark>')
21
21
  end
22
22
  end
23
23
  end
@@ -8,13 +8,15 @@ module JekyllMiscellaneous
8
8
  # == Parameters:
9
9
  # tag_name::
10
10
  # The name of the tag.
11
- # id::
12
- # The ID of the YouTube video.
11
+ # markup::
12
+ # The markup inside the tag.
13
13
  # tokens::
14
14
  # The tokens to parse.
15
- def initialize(tag_name, id, tokens)
15
+ def initialize(tag_name, markup, tokens)
16
16
  super
17
- @id = id.strip
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
- "<div class='youtube-container'><iframe src=\"https://www.youtube-nocookie.com/embed/#{@id}\"></iframe></div>"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllMiscellaneous
4
- VERSION = '1.2.0'
4
+ VERSION = '1.4.0'
5
5
  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.2.0
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: 2022-09-06 00:00:00.000000000 Z
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.0.9
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.