From 20de112526bcf34004e22d2c89c01f4f5154a03d Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Fri, 29 Jul 2011 10:49:37 -0400 Subject: include_code is now more forgiving, stripping leading forward slashes from the code_dir config --- plugins/include_code.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1