More conversion of Jekyll.sanitized_path ~> site.in_(source|dest)_dir

This commit is contained in:
Parker Moore 2014-10-21 09:01:06 -07:00
parent ca40c771d0
commit 2ee8d690c4
5 changed files with 5 additions and 8 deletions

View File

@ -160,7 +160,7 @@ module Jekyll
# Returns the full path to the output file of this document.
def destination(base_directory)
dest = site.in_dest_dir(base_directory)
path = Jekyll.sanitized_path(dest, url)
path = site.in_dest_dir(dest, url)
path = File.join(path, "index.html") if url =~ /\/$/
path
end

View File

@ -140,8 +140,7 @@ module Jekyll
#
# Returns the destination file path String.
def destination(dest)
dest = site.in_dest_dir(dest)
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
path = site.in_dest_dir(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if url =~ /\/$/
path
end

View File

@ -268,8 +268,7 @@ module Jekyll
# Returns destination file path String.
def destination(dest)
# The url needs to be unescaped in order to preserve the correct filename
dest = site.in_dest_dir(dest)
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
path = site.in_dest_dir(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if path[/\.html?$/].nil?
path
end

View File

@ -37,8 +37,7 @@ module Jekyll
#
# Returns destination file path.
def destination(dest)
dest = @site.in_dest_dir(dest)
Jekyll.sanitized_path(dest, File.join(*[destination_rel_dir, @name].compact))
@site.in_dest_dir(*[dest, destination_rel_dir, @name].compact)
end
def destination_rel_dir

View File

@ -161,7 +161,7 @@ eos
end
def resolved_includes_dir(context)
Jekyll.sanitized_path(context.registers[:site].source, page_path(context))
context.registers[:site].in_source_dir(page_path(context))
end
end
end