Skip to content

Instantly share code, notes, and snippets.

@jamieowen
Created March 17, 2012 19:39
Show Gist options
  • Save jamieowen/2064687 to your computer and use it in GitHub Desktop.
Save jamieowen/2064687 to your computer and use it in GitHub Desktop.
Octopress Vimeo plugin...
module Jekyll
class Vimeo < Liquid::Tag
@width = 400
@height = 225
def initialize(name, id, tokens)
super
@id = id
end
def render(context)
%(<iframe width="#{@width}" height="#{@height}" src="http://player.vimeo.com/video/#{@id}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>)
end
end
end
Liquid::Template.register_tag('vimeo', Jekyll::Vimeo)
@Bouni
Copy link

Bouni commented Jun 26, 2012

Tanks for the fast solution Jamie!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment