jekyll-autolinks 0.1.0 → 0.2.0

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: 1efbf4080e17ee8c6baacd375198514960375306d00ae5db4a690fe6e39afbbc
4
- data.tar.gz: 6f5b547545094a894e4e57950e0dc709d2b1d4ce5d58ab8e771448920d7ec96a
3
+ metadata.gz: e8638f20418ea9cf4051514f0c84337d646efee5dda7ce8cb056a54c1cd91f7f
4
+ data.tar.gz: 1ef20440fb51f9b30a0ed9948887f4066e5486000c547b348179363bfeca36e3
5
5
  SHA512:
6
- metadata.gz: 590a2c2236f07c1f548092fdd1bdaa15e9323a6fd6e00b721746ecfdb8d6d7a54e3dfee17ca12af57a3aa40be69b66cd01e75217f95e465b038957234139ed47
7
- data.tar.gz: 50dd8ed83ec0b59cfc5cdbcafe390daa88465af649e0f4c03cdecaa8ba27aace434b8ecbf7fafd713cca73b002c364c6ec0384ba3849e6d2bbf7b1d75115ae9c
6
+ metadata.gz: c2c25d03f5dfce8ef2e063c4b6729696fa20df6caa84fb900da30e26ac2af16563e7d1451e7c6ee3e36ad2e08aaf18e99793d5493b7df361850ac8d529ffa139
7
+ data.tar.gz: b967e6affa87e94f1c4bd50dc182a8a88d9f882dc65a3490af90de28fb027c08af8899e8316486bfbc5279a5ffa61db6cc025e170cdbaac6e0f5a18d1bcc3746
data/Gemfile.lock CHANGED
@@ -1,33 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-autolinks (0.1.0)
5
- jekyll (>= 3.9.3)
4
+ jekyll-autolinks (0.2.0)
5
+ jekyll (>= 3.9.5)
6
6
  rinku (~> 2.0.6)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.0.5)
11
+ activesupport (7.1.3.3)
12
+ base64
13
+ bigdecimal
12
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ connection_pool (>= 2.2.5)
16
+ drb
13
17
  i18n (>= 1.6, < 2)
14
18
  minitest (>= 5.1)
19
+ mutex_m
15
20
  tzinfo (~> 2.0)
16
- addressable (2.8.4)
21
+ addressable (2.8.6)
17
22
  public_suffix (>= 2.0.2, < 6.0)
23
+ base64 (0.2.0)
24
+ bigdecimal (3.1.8)
18
25
  colorator (1.1.0)
19
- concurrent-ruby (1.2.2)
26
+ concurrent-ruby (1.2.3)
27
+ connection_pool (2.4.1)
28
+ drb (2.2.1)
20
29
  em-websocket (0.5.3)
21
30
  eventmachine (>= 0.12.9)
22
31
  http_parser.rb (~> 0)
23
32
  eventmachine (1.2.7)
24
- ffi (1.15.5)
33
+ ffi (1.16.3)
25
34
  forwardable-extended (2.6.0)
26
- google-protobuf (3.23.3-arm64-darwin)
35
+ google-protobuf (4.26.1)
36
+ rake (>= 13)
37
+ google-protobuf (4.26.1-aarch64-linux)
38
+ rake (>= 13)
39
+ google-protobuf (4.26.1-arm64-darwin)
40
+ rake (>= 13)
41
+ google-protobuf (4.26.1-x86-linux)
42
+ rake (>= 13)
43
+ google-protobuf (4.26.1-x86_64-darwin)
44
+ rake (>= 13)
45
+ google-protobuf (4.26.1-x86_64-linux)
46
+ rake (>= 13)
27
47
  http_parser.rb (0.8.0)
28
- i18n (1.14.1)
48
+ i18n (1.14.5)
29
49
  concurrent-ruby (~> 1.0)
30
- jekyll (4.3.2)
50
+ jekyll (4.3.3)
31
51
  addressable (~> 2.4)
32
52
  colorator (~> 1.0)
33
53
  em-websocket (~> 0.5)
@@ -52,42 +72,112 @@ GEM
52
72
  kramdown-parser-gfm (1.1.0)
53
73
  kramdown (~> 2.0)
54
74
  liquid (4.0.4)
55
- listen (3.8.0)
75
+ listen (3.9.0)
56
76
  rb-fsevent (~> 0.10, >= 0.10.3)
57
77
  rb-inotify (~> 0.9, >= 0.9.10)
58
78
  mercenary (0.4.0)
59
- minitest (5.18.1)
60
- mocha (2.0.4)
79
+ minitest (5.23.0)
80
+ mocha (2.3.0)
61
81
  ruby2_keywords (>= 0.0.5)
82
+ mutex_m (0.2.0)
62
83
  pathutil (0.16.2)
63
84
  forwardable-extended (~> 2.6)
64
- public_suffix (5.0.1)
65
- rake (13.0.6)
85
+ public_suffix (5.0.5)
86
+ rake (13.2.1)
66
87
  rb-fsevent (0.11.2)
67
88
  rb-inotify (0.10.1)
68
89
  ffi (~> 1.0)
69
- rexml (3.2.5)
90
+ rexml (3.2.8)
91
+ strscan (>= 3.0.9)
70
92
  rinku (2.0.6)
71
- rouge (4.1.2)
93
+ rouge (4.2.1)
72
94
  ruby2_keywords (0.0.5)
73
95
  safe_yaml (1.0.5)
74
- sass-embedded (1.63.6-arm64-darwin)
75
- google-protobuf (~> 3.23)
96
+ sass-embedded (1.77.2)
97
+ google-protobuf (>= 3.25, < 5.0)
98
+ rake (>= 13.0.0)
99
+ sass-embedded (1.77.2-aarch64-linux-android)
100
+ google-protobuf (>= 3.25, < 5.0)
101
+ sass-embedded (1.77.2-aarch64-linux-gnu)
102
+ google-protobuf (>= 3.25, < 5.0)
103
+ sass-embedded (1.77.2-aarch64-linux-musl)
104
+ google-protobuf (>= 3.25, < 5.0)
105
+ sass-embedded (1.77.2-aarch64-mingw-ucrt)
106
+ google-protobuf (>= 3.25, < 5.0)
107
+ sass-embedded (1.77.2-arm-linux-androideabi)
108
+ google-protobuf (>= 3.25, < 5.0)
109
+ sass-embedded (1.77.2-arm-linux-gnueabihf)
110
+ google-protobuf (>= 3.25, < 5.0)
111
+ sass-embedded (1.77.2-arm-linux-musleabihf)
112
+ google-protobuf (>= 3.25, < 5.0)
113
+ sass-embedded (1.77.2-arm64-darwin)
114
+ google-protobuf (>= 3.25, < 5.0)
115
+ sass-embedded (1.77.2-riscv64-linux-android)
116
+ google-protobuf (>= 3.25, < 5.0)
117
+ sass-embedded (1.77.2-riscv64-linux-gnu)
118
+ google-protobuf (>= 3.25, < 5.0)
119
+ sass-embedded (1.77.2-riscv64-linux-musl)
120
+ google-protobuf (>= 3.25, < 5.0)
121
+ sass-embedded (1.77.2-x86-cygwin)
122
+ google-protobuf (>= 3.25, < 5.0)
123
+ sass-embedded (1.77.2-x86-linux-android)
124
+ google-protobuf (>= 3.25, < 5.0)
125
+ sass-embedded (1.77.2-x86-linux-gnu)
126
+ google-protobuf (>= 3.25, < 5.0)
127
+ sass-embedded (1.77.2-x86-linux-musl)
128
+ google-protobuf (>= 3.25, < 5.0)
129
+ sass-embedded (1.77.2-x86-mingw-ucrt)
130
+ google-protobuf (>= 3.25, < 5.0)
131
+ sass-embedded (1.77.2-x86_64-cygwin)
132
+ google-protobuf (>= 3.25, < 5.0)
133
+ sass-embedded (1.77.2-x86_64-darwin)
134
+ google-protobuf (>= 3.25, < 5.0)
135
+ sass-embedded (1.77.2-x86_64-linux-android)
136
+ google-protobuf (>= 3.25, < 5.0)
137
+ sass-embedded (1.77.2-x86_64-linux-gnu)
138
+ google-protobuf (>= 3.25, < 5.0)
139
+ sass-embedded (1.77.2-x86_64-linux-musl)
140
+ google-protobuf (>= 3.25, < 5.0)
76
141
  shoulda (4.0.0)
77
142
  shoulda-context (~> 2.0)
78
143
  shoulda-matchers (~> 4.0)
79
144
  shoulda-context (2.0.0)
80
145
  shoulda-matchers (4.5.1)
81
146
  activesupport (>= 4.2.0)
147
+ strscan (3.1.0)
82
148
  terminal-table (3.0.2)
83
149
  unicode-display_width (>= 1.1.1, < 3)
84
150
  tzinfo (2.0.6)
85
151
  concurrent-ruby (~> 1.0)
86
- unicode-display_width (2.4.2)
152
+ unicode-display_width (2.5.0)
87
153
  webrick (1.8.1)
88
154
 
89
155
  PLATFORMS
90
- arm64-darwin-22
156
+ aarch64-linux
157
+ aarch64-linux-android
158
+ aarch64-linux-gnu
159
+ aarch64-linux-musl
160
+ aarch64-mingw-ucrt
161
+ arm-linux-androideabi
162
+ arm-linux-gnueabihf
163
+ arm-linux-musleabihf
164
+ arm64-darwin
165
+ riscv64-linux-android
166
+ riscv64-linux-gnu
167
+ riscv64-linux-musl
168
+ ruby
169
+ x86-cygwin
170
+ x86-linux
171
+ x86-linux-android
172
+ x86-linux-gnu
173
+ x86-linux-musl
174
+ x86-mingw-ucrt
175
+ x86_64-cygwin
176
+ x86_64-darwin
177
+ x86_64-linux
178
+ x86_64-linux-android
179
+ x86_64-linux-gnu
180
+ x86_64-linux-musl
91
181
 
92
182
  DEPENDENCIES
93
183
  bundler
@@ -97,4 +187,4 @@ DEPENDENCIES
97
187
  shoulda
98
188
 
99
189
  BUNDLED WITH
100
- 2.4.10
190
+ 2.5.9
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2023 ADoyle (adoyle.h@gmail.com)
1
+ Copyright (c) 2023-2024 ADoyle (adoyle.h@gmail.com)
2
2
  Some rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
data/README.md CHANGED
@@ -24,14 +24,12 @@ Modified based on [ivantsepp/jekyll-autolink_email](https://github.com/ivantsepp
24
24
  - jekyll-autolinks
25
25
  ```
26
26
 
27
- ## Usage
28
-
29
27
  ## Configuration
30
28
 
31
29
  Autolinking is done by [Rinku](https://github.com/vmg/rinku) so visit that gem for a more in-depth explanation of the configuration options:
32
30
 
33
31
  ```yml
34
- autolink_email:
32
+ autolinks:
35
33
  link_attr: 'target="_blank"'
36
34
  skip_tags: ["a", "pre", "code", "kbd", "script"]
37
35
  ```
@@ -40,7 +38,7 @@ autolink_email:
40
38
 
41
39
  ```
42
40
  link_attr: 'target="_blank" class="my-link"'
43
- # hi.com => '<a href="http://hi.com" target="_blank" class="my-link">hi.com</a>'
41
+ # hi.com => '<a href="http://hi.com" target="_blank" class="my-link">hi.com</a>'
44
42
  ```
45
43
 
46
44
  - `skip_tags` is a list of strings with the names of HTML tags that will be skipped when autolinking. If nil, this defaults to the value of the global Rinku.skip_tags, which is initially `["a", "pre", "code", "kbd", "script"]`.
@@ -51,7 +49,7 @@ autolink_email:
51
49
 
52
50
  ## Copyright and License
53
51
 
54
- Copyright 2023 ADoyle (adoyle.h@gmail.com). Some Rights Reserved.
52
+ Copyright 2023-2024 ADoyle (adoyle.h@gmail.com). Some Rights Reserved.
55
53
  The project is licensed under the **BSD 3-clause License**.
56
54
 
57
55
  Read the [LICENSE][] file for the specific language governing permissions and limitations under the License.
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "jekyll-autolinks"
7
- spec.version = "0.1.0"
7
+ spec.version = "0.2.0"
8
8
  spec.authors = ["ADoyle"]
9
9
  spec.email = ["adoyle.h@gmail.com"]
10
10
  spec.summary = "Autolink for your Jekyll site."
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_dependency "jekyll", '>= 3.9.3'
19
+ spec.add_dependency "jekyll", '>= 3.9.5'
20
20
  spec.add_dependency "rinku", '~> 2.0.6'
21
21
 
22
22
  spec.add_development_dependency "bundler"
@@ -1,32 +1,12 @@
1
1
  require 'jekyll'
2
2
  require 'rinku'
3
3
 
4
- module Jekyll
5
- class Autolinks < Jekyll::Generator
6
- safe true
7
-
8
- def initialize(config)
9
- config['autolinks'] ||= {}
10
- end
11
-
12
- def generate(site)
13
- @site = site
14
- site.pages.each { |page| autolinkify page if page.html?}
15
- site.posts.docs.each { |page| autolinkify page }
16
- end
17
-
18
- private
19
-
20
- def autolinkify(page)
21
- page.content = +Rinku.auto_link(page.content, :all, link_attr, skip_tags)
22
- end
23
-
24
- def link_attr
25
- @link_attr ||= @site.config['autolinks']['link_attr']
26
- end
27
-
28
- def skip_tags
29
- @skip_tags ||= Array(@site.config['autolinks']['skip_tags'])
30
- end
4
+ Jekyll::Hooks.register :pages, :post_render do |page|
5
+ if not page.html?
6
+ return
31
7
  end
8
+
9
+ link_attr = site.config['autolinks']['link_attr']
10
+ skip_tags = site.config['autolinks']['skip_tags']
11
+ page.content = +Rinku.auto_link(page.content, :all, link_attr, skip_tags)
32
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-autolinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ADoyle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-23 00:00:00.000000000 Z
11
+ date: 2024-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.9.3
19
+ version: 3.9.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.9.3
26
+ version: 3.9.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rinku
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.4.10
135
+ rubygems_version: 3.5.9
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Autolink for your Jekyll site.