Class: Jekyll::FontAwesomeTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll/font_awesome.rb

Instance Method Summary collapse

Instance Method Details

#render(context) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/jekyll/font_awesome.rb', line 37

def render(context)
  if tag_contents = determine_arguments(@markup.strip)
    icon_class, icon_extra = tag_contents[0], tag_contents[1]
    icon_tag(icon_class, icon_extra)
  else
    raise ArgumentError.new "Syntax error in tag 'icon' while parsing the following markup:\n\n  \#{@markup}\n\nValid syntax:\n  for icons: {% icon fa-camera-retro %}\n  for icons with size/spin/rotate: {% icon fa-camera-retro fa-lg %}\n"
  end
end