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({
|
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.
|
||||||
|
|
Loading…
Reference in New Issue