sutty-liquid 0.7.0 → 0.7.1
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/lib/jekyll/filters/social_network.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71f4b369c3f6a7abf71811e1f5c9c95a69639c511507df0679b2a87bc2f84341
|
|
4
|
+
data.tar.gz: 4c86e2f9be638bd60a7f5a02cdfad76523e60fc07a98dd567da6950ebef6d1b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea1c1fe8c57294b6b954fea1021f3c62cff4697852a297d395403409e38432697fca55f35879bb0920ef2b218b087c75e8dfb66dc15146d8c8749e2ac9d8ed23
|
|
7
|
+
data.tar.gz: 5b5c622c4b38b24e44ae262d914affd3c0dd52554a17a1a926c5d036c526a12723063c448601556075661a3cdb84f0ee773ef2a43a063c15118e639656f61bd6
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
module Jekyll
|
|
4
4
|
module Filters
|
|
5
5
|
module SocialNetwork
|
|
6
|
+
SUBDOMAINS = /\A(www|chat)\./.freeze
|
|
7
|
+
|
|
6
8
|
# Takes a URL and returns a Hash of attributes, useful when you
|
|
7
9
|
# want to generate social network buttons from an undetermined
|
|
8
10
|
# list of URLs.
|
|
@@ -24,7 +26,7 @@ module Jekyll
|
|
|
24
26
|
require 'uri'
|
|
25
27
|
|
|
26
28
|
uri = URI url
|
|
27
|
-
uri.host.sub!
|
|
29
|
+
uri.host.sub! SUBDOMAINS, ''
|
|
28
30
|
name = %r{/@\w+} =~ uri.query ? 'mastodon' : uri.host.split('.', 2).first
|
|
29
31
|
|
|
30
32
|
{ 'host' => uri.host, 'name' => name, 'url' => url }.to_liquid
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sutty-liquid
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- f
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-01-
|
|
11
|
+
date: 2021-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|