Skip to content

Instantly share code, notes, and snippets.

@gehaxelt
Created September 15, 2012 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gehaxelt/3728125 to your computer and use it in GitHub Desktop.
Save gehaxelt/3728125 to your computer and use it in GitHub Desktop.
Fancybox.rb
# - baseURL statt "../" im href-Tag
# - Angabe eines Alt/Title-Tags für die Bilder
# -> Octopress-Aufruf {%fancybox IMGNAME TITLE ALT %}
module Jekyll
class Fancybox < Liquid::Tag
#@@baseURL = "http://gehaxelt.in"
def initialize(name, args, tokens)
super
@url = args
#@altTag =
#@hrefTag =
end
def render(context)
%(<a href="../images/posts/#{@url}" class="fancybox" ><img src="../images/posts/small/#{@url}" /></a>)
end
end
end
Liquid::Template.register_tag('fancybox', Jekyll::Fancybox)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment