Pass the context on to IncludeRelativeTag#page_path

This commit is contained in:
Parker Moore 2014-10-12 15:16:38 -07:00
parent 22cc393cd4
commit b564214535
1 changed files with 2 additions and 2 deletions

View File

@ -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