Browse Source

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

unreleased_contents
Brandon Mathis 13 years ago
parent
commit
20de112526
  1. 2
      plugins/include_code.rb

2
plugins/include_code.rb

@ -38,7 +38,7 @@ module Jekyll
end end
def render(context) 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 code_path = (Pathname.new(context.registers[:site].source) + code_dir).expand_path
file = code_path + @file file = code_path + @file

Loading…
Cancel
Save