|
|
@ -5,7 +5,7 @@
|
|
|
|
# Syntax {% image [class name(s)] url [title text] %}
|
|
|
|
# Syntax {% image [class name(s)] url [title text] %}
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
# Example:
|
|
|
|
# {% imaeg left half http://site.com/images/ninja.png Ninja Attack! %}
|
|
|
|
# {% ima left half http://site.com/images/ninja.png Ninja Attack! %}
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Output:
|
|
|
|
# Output:
|
|
|
|
# <image class='left' src="http://site.com/images/ninja.png" title="Ninja Attack!" alt="Ninja Attack!">
|
|
|
|
# <image class='left' src="http://site.com/images/ninja.png" title="Ninja Attack!" alt="Ninja Attack!">
|
|
|
@ -30,7 +30,7 @@ module Jekyll
|
|
|
|
def render(context)
|
|
|
|
def render(context)
|
|
|
|
output = super
|
|
|
|
output = super
|
|
|
|
if @img
|
|
|
|
if @img
|
|
|
|
figure = "<img class='#{@class}' src='#{@img}' alt='#{@title}' title='#{@title}'>"
|
|
|
|
"<img class='#{@class}' src='#{@img}' alt='#{@title}' title='#{@title}'>"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
"Error processing input, expected syntax: {% img [class name(s)] /url/to/image [title text] %}"
|
|
|
|
"Error processing input, expected syntax: {% img [class name(s)] /url/to/image [title text] %}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|