aboutsummaryrefslogtreecommitdiff
path: root/plugins/include_code.rb
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-08-21 16:15:46 -0400
committerBrandon Mathis <brandon@imathis.com>2011-08-21 16:16:03 -0400
commit11c6e1f7a73fa19c51687f93af7dc8afbc60cb5e (patch)
treedd30ff736d9bd37d76cc3498640d9a4a1bdc7f50 /plugins/include_code.rb
parent089af26b02dbdce0c960aa544bd8b803d69d4e5f (diff)
downloadmy_new_personal_website-11c6e1f7a73fa19c51687f93af7dc8afbc60cb5e.tar.xz
my_new_personal_website-11c6e1f7a73fa19c51687f93af7dc8afbc60cb5e.zip
include_code now defaults to relative urls for easy testing on a development server
Diffstat (limited to 'plugins/include_code.rb')
-rw-r--r--plugins/include_code.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/include_code.rb b/plugins/include_code.rb
index 5529f322..70d5f138 100644
--- a/plugins/include_code.rb
+++ b/plugins/include_code.rb
@@ -58,7 +58,7 @@ module Jekyll
code = file.read
@filetype = file.extname.sub('.','') if @filetype.nil?
title = @title ? "#{@title} (#{file.basename})" : file.basename
- url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}"
+ url = "/#{code_dir}/#{@file}"
source = "<div><figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
source += " #{highlight(code, @filetype)}</figure></div>"
end