markdown_media 1.2.0 → 1.2.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/Gemfile +1 -0
- data/README.md +6 -3
- data/lib/markdown_media/version.rb +1 -1
- data/lib/templates/twitter.erb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37e4b387f58ff1ddad024fba1d2d079a6e7051c9
|
|
4
|
+
data.tar.gz: 71f51c61389cb3ba219e211dd374c9c447a1742a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff21b20aeafc8edce6c63a4cd27fef6e616dc615655c92a240bd47969797421336f209bfb00cf67705419bb0c8df84dfd5603727ba8eba1915279ea43df4c5b8
|
|
7
|
+
data.tar.gz: c5a358845d8fdaa8954b6445995b10fc453c62218be82dce131fdce24d65caf7605e407eaffb14b7ad371ba49604483249e32c2f991d20e0da9ad760d6b6ccf1
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://travis-ci.org/veganstraightedge/markdown_media)
|
|
4
4
|
[](https://codeclimate.com/github/veganstraightedge/markdown_media)
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
This syntax uses doubles square brackets on each side of a URL and optional options.
|
|
8
8
|
It expands into the current preferred embed code for that site's media or raw media.
|
|
9
|
-
Supported media types: YouTube, Vimeo, Instagram, Twitter, images, videos, audios.
|
|
9
|
+
Supported media types: YouTube, Vimeo, Instagram, Twitter, Daily Motion, images, videos, audios.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
@@ -46,6 +46,8 @@ media URL
|
|
|
46
46
|
caption
|
|
47
47
|
link URL (for images only)
|
|
48
48
|
HTML id
|
|
49
|
+
HTML class
|
|
50
|
+
type (used for Twitter video)
|
|
49
51
|
]]
|
|
50
52
|
```
|
|
51
53
|
|
|
@@ -181,7 +183,7 @@ A simple audio with caption.
|
|
|
181
183
|
Any URL in a [[]] block that is unrecognized, just gets rendered into a linked URL.
|
|
182
184
|
|
|
183
185
|
```
|
|
184
|
-
[[https://veganstraightedge.com/cancer]] gets turned into <a href="https://veganstraightedge.com/cancer">https://veganstraightedge.com</a>.
|
|
186
|
+
[[https://veganstraightedge.com/cancer]] gets turned into <a href="https://veganstraightedge.com/cancer">https://veganstraightedge.com/cancer</a>.
|
|
185
187
|
```
|
|
186
188
|
|
|
187
189
|
If you try to embed some piece of media and it renders to a URL that means that that kind of URL isn't supported yet. But don't distress, new sites are pretty easy to add. So, raise a flag in Slack or GitHub Issues.
|
|
@@ -204,6 +206,7 @@ Here are the currently supported URLs and media types.
|
|
|
204
206
|
- https://www.youtube.com/watch?v=video-id
|
|
205
207
|
- https://youtu.be/video-id
|
|
206
208
|
- http://www.dailymotion.com/video/video-id_video-slug
|
|
209
|
+
- https://twitter.com/Breaking911/status/900211169734131713
|
|
207
210
|
|
|
208
211
|
#### Audios
|
|
209
212
|
|
data/lib/templates/twitter.erb
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<% if type == "video" %><figure class="video-container"><% end %>
|
|
2
|
+
<blockquote class="twitter-<%=type %> <%= klass %>" <%= 'data-status="hidden"' if type == "video" %> data-lang="en" id="<%= id %>">
|
|
3
|
+
<a href="<%= embed_id.to_s %>"><%= embed_id.to_s %></a>
|
|
4
|
+
</blockquote>
|
|
5
|
+
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
|
|
6
|
+
<% if type == "video" %></figure><% end %>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: markdown_media
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shane Becker
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|