move path handling in pages to the `path` method, as in posts

This commit is contained in:
maul.esel 2013-07-22 15:03:00 +02:00
parent f0e2468249
commit 08567b1091
1 changed files with 2 additions and 2 deletions

View File

@ -118,14 +118,14 @@ module Jekyll
self.data.deep_merge({ self.data.deep_merge({
"url" => self.url, "url" => self.url,
"content" => self.content, "content" => self.content,
"path" => self.data.fetch('path', path) }) "path" => self.path })
end end
# The path to the source file # The path to the source file
# #
# Returns the path to the source file # Returns the path to the source file
def path def path
File.join(@dir, @name).sub(/\A\//, '') self.data.fetch('path', File.join(@dir, @name).sub(/\A\//, ''))
end end
# Obtain destination path. # Obtain destination path.