jekyll-theme-open-project-helpers 2.0.13 → 2.0.14
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8da882361b078a526c503a4994773a79ff2faa87
|
4
|
+
data.tar.gz: 7cbdc03e335efa716bca2a66c0242da8a8b10ec1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd319c9b99b324f349c1e8d3f95936f0442113c8bd221ea4f9b406c964f2a0ae499e7219ff9609ee4b412597419bdc5e9c34deee7eb8d94763ff3072f6c956fe
|
7
|
+
data.tar.gz: e49c394d55602d69fb4c96e61a1723237725c93e06f05c563db9d0f607ae43d8758ae3a5e136acfbebc683db5b1ac353a166082d9082807e967774f6f67146ed
|
@@ -11,9 +11,10 @@ require 'uri'
|
|
11
11
|
def process_content(site_hostname, content, exclude_selectors=[])
|
12
12
|
content = Nokogiri::HTML(content)
|
13
13
|
content.css('body.site--project main a, body.site--hub.layout--post main a').each do |a|
|
14
|
-
next unless a.get_attribute('href') =~ /\Ahttp/i
|
15
|
-
next if a.get_attribute('href').include? site_hostname
|
16
14
|
next if matches_one_of(a, exclude_selectors)
|
15
|
+
next unless a.get_attribute('href') =~ /\Ahttp/i
|
16
|
+
next if a.get_attribute('href') =~ /\Ahttp(s)?:\/\/#{site_hostname}\//i
|
17
|
+
next if a.inner_html.include? "ico-ext"
|
17
18
|
a.set_attribute('rel', 'external')
|
18
19
|
a.inner_html = "#{a.inner_html}<span class='ico-ext'><i class='fas fa-external-link-square-alt'></i></span>"
|
19
20
|
end
|