Helps you embed Youtube and Vimeo videos responsively to your Octopress since 2012. Also supports embeds from TrailerAddict, Ooyala (video player used by The Verge and Polygon) and Dailymotion.
There are 3 easy steps.
- Add
youtube.rb
,dailymotion.rb
,vimeo.rb
,traileraddict.rb
,ooyala.rb
to yourplugin
folder. - Copy the content from
rve-styles.css
to your own stylesheet or just add it to your template. (Or, to keep everything in sass, see below) - Now you can easily embed videos using only the
id
like this:
# Vimeo example
{% vimeo 20241459 %}
# Youtube example
{% youtube QWq0bSvc31A %}
# TrailerAddict example
{% traileraddict 66840 %}
# Ooyala example (needs two id's, pbid and ec)
{% ooyala 2ff6d6fff2b2457bb9ea2cfcf77dc25b 1xaW1nYTqi1Z1ZiLwcJ2qSSrg94NAtkQ %}
# Dailymotion example
{% dailymotion xme2zs %}
- Copy
_rve.scss
to/sass/custom
- Add
@import "custom/rve"
to/sass/screen.scss
Thanks go to Anders M. Andersen for his blogpost about responsive embeds and to Portway Point for their Jekyll Youtube Liquid Template Tag Gist.
Special thanks go to:
- @geetotes for the Trailer Addict support
- @DennisLaumen for the Ooyala support
- @jcbedier for the Dailymotion support
- @bhean for making it work with SSL enabled sites