allow overriding page.path in YAML frontmatter
This commit is contained in:
parent
65f0d66e39
commit
968f3b0911
|
@ -125,7 +125,7 @@ module Jekyll
|
|||
self.data.deep_merge({
|
||||
"url" => self.url,
|
||||
"content" => self.content,
|
||||
"path" => File.join(@dir, @name).sub(/\A\//, '') })
|
||||
"path" => self.data['path'] || File.join(@dir, @name).sub(/\A\//, '') })
|
||||
end
|
||||
|
||||
# Obtain destination path.
|
||||
|
|
|
@ -287,7 +287,7 @@ module Jekyll
|
|||
"tags" => self.tags,
|
||||
"content" => self.content,
|
||||
"excerpt" => self.excerpt,
|
||||
"path" => File.join(@dir, '_posts', @name).sub(/\A\//, '') })
|
||||
"path" => self.data['path'] || File.join(@dir, '_posts', @name).sub(/\A\//, '') })
|
||||
end
|
||||
|
||||
# Returns the shorthand String identifier of this Post.
|
||||
|
|
Loading…
Reference in New Issue