More conversion of Jekyll.sanitized_path ~> site.in_(source|dest)_dir
This commit is contained in:
parent
ca40c771d0
commit
2ee8d690c4
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue