From b564214535dd6972be687481a4b1ab05dd1f0652 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 12 Oct 2014 15:16:38 -0700 Subject: [PATCH] Pass the context on to IncludeRelativeTag#page_path --- lib/jekyll/tags/include.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index fbe03ed3..c6b1ed9c 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -156,12 +156,12 @@ eos '.' end - def page_path + def page_path(context) context.registers[:page].nil? ? includes_dir : File.dirname(context.registers[:page]["path"]) end def resolved_includes_dir(context) - Jekyll.sanitized_path(context.registers[:site].source, page_path) + Jekyll.sanitized_path(context.registers[:site].source, page_path(context)) end end end