diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-07-29 10:49:37 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-07-29 10:49:54 -0400 |
commit | 20de112526bcf34004e22d2c89c01f4f5154a03d (patch) | |
tree | 027b3187d8f92c48d73bd9e90356e3104f52b45a /plugins/include_code.rb | |
parent | df86e647b1200f724ba8924eb474b9334ca0fd68 (diff) | |
download | my_new_personal_website-20de112526bcf34004e22d2c89c01f4f5154a03d.tar.xz my_new_personal_website-20de112526bcf34004e22d2c89c01f4f5154a03d.zip |
include_code is now more forgiving, stripping leading forward slashes from the code_dir config
Diffstat (limited to '')
-rw-r--r-- | plugins/include_code.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/include_code.rb b/plugins/include_code.rb index 93db78a3..ec72006c 100644 --- a/plugins/include_code.rb +++ b/plugins/include_code.rb @@ -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 |