include_code is now more forgiving, stripping leading forward slashes from the code_dir config

This commit is contained in:
Brandon Mathis 2011-07-29 10:49:37 -04:00
parent df86e647b1
commit 20de112526
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ module Jekyll
end
def render(context)
code_dir = (context.registers[:site].config['code_dir'] || 'downloads/code')
code_dir = (context.registers[:site].config['code_dir'].sub(/^\//,'') || 'downloads/code')
code_path = (Pathname.new(context.registers[:site].source) + code_dir).expand_path
file = code_path + @file