fix youtube embedding
parent
b98b9f6a5b
commit
235af9ae12
|
@ -23,9 +23,10 @@ def image(name, title="", link=nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
def youtube(url)
|
def youtube(url)
|
||||||
|
embed_url = url.gsub("watch?v=", "embed/")
|
||||||
<<EOL
|
<<EOL
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<iframe width="560" height="315" src="#{url}" frameborder="0" allowfullscreen>
|
<iframe width="560" height="315" src="#{embed_url}" frameborder="0" allowfullscreen>
|
||||||
</iframe>
|
</iframe>
|
||||||
<a href="#{url}">(watch on Youtube)</a>
|
<a href="#{url}">(watch on Youtube)</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue