From 4ece188ebaad096dba0ac9443e508901099dd2a6 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Fri, 29 Jul 2011 10:49:37 -0400 Subject: [PATCH] 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 93db78a..ec72006 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