Tuan-Anh Tran

BetterTube - A jekyll plugin for embedding YouTube videos

Posted on July 31, 2014  •  1 minutes  • 104 words

Sample syntax

{%raw%}

{% youtube http://youtu.be/NiYCgVKioI4 %}

{%endraw%}

or even shorter

{% raw %}

{% youtube NiYCgVKioI4 %}

{% endraw %}

Basically, this plugin will replace your youtube tag with a beautiful, responsive thumbnail of the video instead of loading the iframe and a bunch of other stuff along with that iframe, right on page load (pagespeed, remember?). On click, it will replace the image with the iframe for embedding video and play (autoplay=1). And did i mention it’s responsive too?

I will publish this plugin on Github as soon as I clean up the code.

The plugin is now available on Github .

Follow me

Here's where I hang out in social media