This Jekill/Octopress plugin improves the responsiveness on page that embed many youtube iframe by delaying the iframe creation until the user clicks on the video
Ruby CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
plugin
sass/custom
.gitignore
README.md

README.md

jekyll-youtube-lazyloading

This Jekill/Octopress plugin improves the responsiveness on page that embed many youtube iframe by delaying the iframe creation until the user clicks on the video

How to use it

add a {% youtube <videoid> %} in your markdown page

Demo

see this page for a demo

How to install it ?

  1. Add gem 'yt' to your Gemfile and run Bundle

  2. Add your Youtube API key to your _config.yml file:

    youtube:
      api_key: <put your key here>
    
  3. Add youtube.rb to your plugin folder

  4. Copy _rve.sccs to /sass/custom

  5. Add @import "custom/rve" to /sass/screen.scss

Credits

Thanks go to Anders M. Andersen for his blogpost about responsive embeds and to Portway Point for their Jekyll Youtube Liquid Template Tag Gist

Thanks to Fullscreen for yt, "The reliable YouTube API Ruby client".

Endorsement

If you like it feel free to endorse me: