This is a Jekyll plugin for creating YouTube or Vimeo embed codes.
Put the plugin file video-embeds.rb
in your _plugins
directory. Create a tag specifying the type
of video you want to embed with the first required argument, the video id.
{% youtube ab1234ab1 %}
You can also specify a height and width. If you do not, it defaults to 500 x 281.
{% vimeo 123456789 1920 1080 %}
Just in case anyone is curious, I'm using Embedly for this task (and more) these days. This Jekyll plugin is a start for implementing it. https://github.com/robb/jekyll-embedly-client