jekyll-onebox 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -2
- data/lib/jekyll-onebox/onebox_tag.rb +3 -3
- data/lib/jekyll-onebox/version.rb +1 -1
- 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: 7acae8b399ce2ac21c7b4b4bce821913f9dd50fc
|
4
|
+
data.tar.gz: 2c9f395e055ddcece0f3f76452a5fc07ebe60509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c6ba7774efdff96fd7f1d5f2947bfc9ca518ebe61e4232b3fd307440ff131b8ff46fa422dce0dca091429297c18cdbb59f6f0aa784eb719beead3fdbcbaec8f
|
7
|
+
data.tar.gz: 34a4d5d7a129a006f57fb2c6090703accd0af73bbf276abd50ad4c2041fc8b0307fb17378e9965b4e928c9184689e9a441bfc85e6af1f738dc98ba6e3ce56fd0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Jekyll::Onebox
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/jekyll-onebox.svg)](https://badge.fury.io/rb/jekyll-onebox)
|
4
|
+
|
3
5
|
Liquid tag for displaying GitHub Gists in Jekyll sites: `{% gist %}`.
|
4
6
|
|
5
7
|
## Installation
|
@@ -30,12 +32,12 @@ plugins:
|
|
30
32
|
Use the tag as follows in your Jekyll pages, posts and collections:
|
31
33
|
|
32
34
|
```liquid
|
33
|
-
{% onebox
|
35
|
+
{% onebox https://github.com/rriemann/jekyll-onebox/blob/master/README.md %}
|
34
36
|
```
|
35
37
|
|
36
38
|
This will create a html preview, i.e. an embed, for websites supported by the ruby gem [onebox](https://github.com/discourse/onebox).
|
37
39
|
|
38
|
-
The html preview depends on the actual link and may be the [oEmbed](http://oembed.com/) or [Open Graph](https://developers.facebook.com/docs/opengraph/) of a (whitelisted) website with support for those previews. Onebox also comes with many engines to construct a custom preview for supported websites, such as IMDB, Amazon, Wikipedia, etc.
|
40
|
+
The html preview depends on the actual link and may be the [oEmbed](http://oembed.com/) or [Open Graph](https://developers.facebook.com/docs/opengraph/) of a (whitelisted) website with support for those previews. Onebox also comes with many engines to construct a custom preview for supported websites, such as IMDB, Amazon, Wikipedia, Spotify, Soundcloud etc.
|
39
41
|
|
40
42
|
**Pro-tip**: Onebox uses in most cases HTTP GET requests to fetch content from the provided link. With evolving website content or updates of the Onebox gem, the html preview of the same link may also evolve.
|
41
43
|
|
@@ -21,7 +21,7 @@ module Jekyll
|
|
21
21
|
class OneboxTag < Liquid::Tag
|
22
22
|
def initialize(tag_name, url, tokens)
|
23
23
|
super
|
24
|
-
|
24
|
+
STDERR.puts url
|
25
25
|
@url = url.strip
|
26
26
|
end
|
27
27
|
|
@@ -31,11 +31,11 @@ module Jekyll
|
|
31
31
|
whitelist = @settings["whitelist"]
|
32
32
|
if whitelist.kind_of?(Array)
|
33
33
|
whitelist.each do |domain|
|
34
|
-
Onebox::Engine::WhitelistedGenericOnebox.whitelist << domain
|
34
|
+
::Onebox::Engine::WhitelistedGenericOnebox.whitelist << domain
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
-
Onebox.preview(@url).to_s
|
38
|
+
::Onebox.preview(@url).to_s
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|