lib/jekyll/page.rb in jekyll-1.0.0.beta4 vs lib/jekyll/page.rb in jekyll-1.0.0.rc1
- old
+ new
@@ -21,22 +21,10 @@
self.process(name)
self.read_yaml(File.join(base, dir), name)
end
- # Read the YAML frontmatter.
- #
- # base - The String path to the dir containing the file.
- # name - The String filename of the file.
- #
- # Returns nothing.
- def read_yaml(base, name)
- super(base, name)
- self.data['layout'] = 'page' unless self.data.has_key?('layout')
- self.data
- end
-
# The generated directory into which the page will be placed
# upon generation. This is derived from the permalink or, if
# permalink is absent, we be '/'
#
# Returns the String destination directory.
@@ -122,10 +110,11 @@
#
# Returns the Hash representation of this Page.
def to_liquid
self.data.deep_merge({
"url" => self.url,
- "content" => self.content })
+ "content" => self.content,
+ "path" => self.data['path'] || File.join(@dir, @name).sub(/\A\//, '') })
end
# Obtain destination path.
#
# dest - The String path to the destination dir.