jekyll-crosspost-to-medium 0.1.10 → 0.1.11
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-crosspost-to-medium.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cef45f1dd83263ecd92c563e365a7fe97fcf13f5
|
4
|
+
data.tar.gz: ff030a5b67b2d45f02f1f975c8e3a18bc1b0be5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 337b95762533b5e480699b6ff0882b024b0af099329332e49c691e202f3fef842678c21b7b34b7e98a896eef9869801096e13c7077017907473c6e7a4512a7c0
|
7
|
+
data.tar.gz: 56c931b4d441e57fb3ea81b11390bd267e827ec018a279283d70f24adcabf62e648ece1700b417be21661ee922318d92c355af09466e7cc3f81fac918f35229d
|
@@ -121,8 +121,9 @@ module Jekyll
|
|
121
121
|
|
122
122
|
def crosspost_payload(crossposted, post, content, title, url)
|
123
123
|
# Update any absolute URLs
|
124
|
-
|
125
|
-
content = content.gsub /
|
124
|
+
# But don’t clobber protocol-less (i.e. "//") URLs
|
125
|
+
content = content.gsub /href=(["'])\/(?!\/)/, "href=\"\1#{@site.config['url']}/"
|
126
|
+
content = content.gsub /src=(["'])\/(?!\/)/, "src=\"\1#{@site.config['url']}/"
|
126
127
|
|
127
128
|
# Save canonical URL
|
128
129
|
canonical_url = url
|