Gets/Sets the content of this layout.
Gets/Sets the Hash that holds the metadata for this layout.
Gets/Sets the extension of this layout.
Gets the name of this layout.
Gets the path to this layout.
Gets the path to this layout relative to its base
Gets the Site object.
Initialize a new Layout.
site - The Site. base - The String path to the source. name - The String filename of the post file.
# File lib/jekyll/layout.rb, line 31 def initialize(site, base, name) @site = site @base = base @name = name if site.theme && site.theme.layouts_path.eql?(base) @base_dir = site.theme.root @path = site.in_theme_dir(base, name) else @base_dir = site.source @path = site.in_source_dir(base, name) end @relative_path = @path.sub(@base_dir, "") self.data = {} process(name) read_yaml(base, name) end
Extract information from the layout filename.
name - The String filename of the layout file.
Returns nothing.
# File lib/jekyll/layout.rb, line 56 def process(name) self.ext = File.extname(name) end