BetterTube - A jekyll plugin for embedding YouTube videos

Sample syntax


{% youtube %}


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.