move path handling in pages to the `path` method, as in posts
This commit is contained in:
parent
f0e2468249
commit
08567b1091
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue