Fix photo link URL.

This commit is contained in:
Stephen McDonald 2011-12-29 11:58:11 +11:00
parent bab178d9f8
commit c26bd30318
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ module Jekyll
max_size = post.keys.map{ |k| k.gsub("photo-url-", "").to_i }.max
url = post["photo-url"] || post["photo-url-#{max_size}"]
content = "<img src=\"#{save_file(url)}\"/>"
content = "<a href=\"#{url}\">#{content}</a>" unless url.nil?
unless post["photo-link-url"].nil?
content = "<a href=\"#{post["photo-link-url"]}\">#{content}</a>"
end
when "audio"
if !post["id3-title"].nil?
title = post["id3-title"]