allow overriding page.path in YAML frontmatter

This commit is contained in:
maul.esel 2013-04-13 00:05:49 +02:00
parent 65f0d66e39
commit 968f3b0911
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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.