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({
|
self.data.deep_merge({
|
||||||
"url" => self.url,
|
"url" => self.url,
|
||||||
"content" => self.content,
|
"content" => self.content,
|
||||||
"path" => File.join(@dir, @name).sub(/\A\//, '') })
|
"path" => self.data['path'] || File.join(@dir, @name).sub(/\A\//, '') })
|
||||||
end
|
end
|
||||||
|
|
||||||
# Obtain destination path.
|
# Obtain destination path.
|
||||||
|
|
|
@ -287,7 +287,7 @@ module Jekyll
|
||||||
"tags" => self.tags,
|
"tags" => self.tags,
|
||||||
"content" => self.content,
|
"content" => self.content,
|
||||||
"excerpt" => self.excerpt,
|
"excerpt" => self.excerpt,
|
||||||
"path" => File.join(@dir, '_posts', @name).sub(/\A\//, '') })
|
"path" => self.data['path'] || File.join(@dir, '_posts', @name).sub(/\A\//, '') })
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the shorthand String identifier of this Post.
|
# Returns the shorthand String identifier of this Post.
|
||||||
|
|
Loading…
Reference in New Issue