diff --git a/lib/jekyll/draft.rb b/lib/jekyll/draft.rb index 27f9d2a1..16daefdf 100644 --- a/lib/jekyll/draft.rb +++ b/lib/jekyll/draft.rb @@ -14,8 +14,8 @@ module Jekyll end # Get the full path to the directory containing the draft files - def containing_dir(source, dir) - Jekyll.sanitized_path(source, File.join(dir, '_drafts')) + def containing_dir(dir) + site.in_source_dir(dir, '_drafts') end # The path to the draft source file, relative to the site source diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 36536173..861ba4ca 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -49,7 +49,7 @@ module Jekyll def initialize(site, source, dir, name) @site = site @dir = dir - @base = containing_dir(source, dir) + @base = containing_dir(dir) @name = name self.categories = dir.downcase.split('/').reject { |x| x.empty? } @@ -88,8 +88,8 @@ module Jekyll end # Get the full path to the directory containing the post files - def containing_dir(source, dir) - return File.join(source, dir, '_posts') + def containing_dir(dir) + site.in_source_dir(dir, '_posts') end # Read the YAML frontmatter.