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({
"url" => self.url,
"content" => self.content,
"path" => self.data.fetch('path', path) })
"path" => self.path })
end
# The path to the source file
#
# Returns the path to the source file
def path
File.join(@dir, @name).sub(/\A\//, '')
self.data.fetch('path', File.join(@dir, @name).sub(/\A\//, ''))
end
# Obtain destination path.