aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-29 10:49:37 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-29 10:49:54 -0400
commit20de112526bcf34004e22d2c89c01f4f5154a03d (patch)
tree027b3187d8f92c48d73bd9e90356e3104f52b45a /plugins
parentdf86e647b1200f724ba8924eb474b9334ca0fd68 (diff)
downloadmy_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 'plugins')
-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 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