Created
March 17, 2012 19:39
-
-
Save jamieowen/2064687 to your computer and use it in GitHub Desktop.
Octopress Vimeo plugin...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Tanks for the fast solution Jamie!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Bouni,
Thats fixed now.. The id was mistakenly declared as a static variable ( @@ ) so was being shared across both vimeo plugins!
Cheers