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 <<-eos
Syntax error in tag 'icon' while parsing the following markup:

  #{@markup}

Valid syntax:
  for icons: {% icon fa-camera-retro %}
  for icons with size/spin/rotate: {% icon fa-camera-retro fa-lg %}
eos
  end
end