Browse code

include_code now defaults to relative urls for easy testing on a development server

Brandon Mathis authored on 21/08/2011 at 20:15:46
Showing 1 changed files
... ...
@@ -58,7 +58,7 @@ module Jekyll
58 58
         code = file.read
59 59
         @filetype = file.extname.sub('.','') if @filetype.nil?
60 60
         title = @title ? "#{@title} (#{file.basename})" : file.basename
61
-        url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}"
61
+        url = "/#{code_dir}/#{@file}"
62 62
         source = "<div><figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
63 63
         source += " #{highlight(code, @filetype)}</figure></div>"
64 64
       end