lib/jekyll/page.rb in jekyll-2.4.0 vs lib/jekyll/page.rb in jekyll-2.5.0
- old
+ new
@@ -124,11 +124,11 @@
# The path to the source file
#
# Returns the path to the source file
def path
- data.fetch('path', relative_path.sub(/\A\//, ''))
+ data.fetch('path') { relative_path.sub(/\A\//, '') }
end
# The path to the page source file, relative to the site source
def relative_path
File.join(*[@dir, @name].map(&:to_s).reject(&:empty?))
@@ -138,10 +138,10 @@
#
# dest - The String path to the destination dir.
#
# Returns the destination file path String.
def destination(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
# Returns the object as a debug String.