Use site.in_source_dir as @mastahyeti suggested

This commit is contained in:
Parker Moore 2014-10-20 21:45:31 -07:00
parent b4a2788626
commit 179b5ab193
2 changed files with 5 additions and 5 deletions

View File

@ -14,8 +14,8 @@ module Jekyll
end end
# Get the full path to the directory containing the draft files # Get the full path to the directory containing the draft files
def containing_dir(source, dir) def containing_dir(dir)
Jekyll.sanitized_path(source, File.join(dir, '_drafts')) site.in_source_dir(dir, '_drafts')
end end
# The path to the draft source file, relative to the site source # The path to the draft source file, relative to the site source

View File

@ -49,7 +49,7 @@ module Jekyll
def initialize(site, source, dir, name) def initialize(site, source, dir, name)
@site = site @site = site
@dir = dir @dir = dir
@base = containing_dir(source, dir) @base = containing_dir(dir)
@name = name @name = name
self.categories = dir.downcase.split('/').reject { |x| x.empty? } self.categories = dir.downcase.split('/').reject { |x| x.empty? }
@ -88,8 +88,8 @@ module Jekyll
end end
# Get the full path to the directory containing the post files # Get the full path to the directory containing the post files
def containing_dir(source, dir) def containing_dir(dir)
return File.join(source, dir, '_posts') site.in_source_dir(dir, '_posts')
end end
# Read the YAML frontmatter. # Read the YAML frontmatter.