From 20de112526bcf34004e22d2c89c01f4f5154a03d Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Fri, 29 Jul 2011 10:49:37 -0400 Subject: [PATCH 1/2] 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 From d6744967fa7572101202d239727b7983004e9603 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Fri, 29 Jul 2011 16:27:13 -0400 Subject: [PATCH 2/2] Improved support for adding author metadata to pages --- .themes/classic/source/_includes/post/author.html | 2 ++ .themes/classic/source/_layouts/page.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.themes/classic/source/_includes/post/author.html b/.themes/classic/source/_includes/post/author.html index b2db904..83dd6a8 100644 --- a/.themes/classic/source/_includes/post/author.html +++ b/.themes/classic/source/_includes/post/author.html @@ -1,5 +1,7 @@ {% if post.author %} {% assign author = post.author %} +{% elsif page.author %} + {% assign author = page.author %} {% else %} {% assign author = site.author %} {% endif %} diff --git a/.themes/classic/source/_layouts/page.html b/.themes/classic/source/_layouts/page.html index a2fc41e..34cb343 100644 --- a/.themes/classic/source/_layouts/page.html +++ b/.themes/classic/source/_layouts/page.html @@ -11,7 +11,11 @@ layout: default {{ content }} {% unless page.footer == false %}