Sha256: a0a149f597b958a3e8263cd487e3bcdef3f33d5d5ccf41d6cf9c4683313e2405
Contents?: true
Size: 893 Bytes
Versions: 8
Compression:
Stored size: 893 Bytes
Contents
module Jekyll class Layout include Convertible # Gets the Site object. attr_reader :site # Gets/Sets the extension of this layout. attr_accessor :ext # Gets/Sets the Hash that holds the metadata for this layout. attr_accessor :data # Gets/Sets the content of this layout. attr_accessor :content # Initialize a new Layout. # # site - The Site. # base - The String path to the source. # name - The String filename of the post file. def initialize(site, base, name) @site = site @base = base @name = name self.data = {} self.process(name) self.read_yaml(base, name) end # Extract information from the layout filename. # # name - The String filename of the layout file. # # Returns nothing. def process(name) self.ext = File.extname(name) end end end
Version data entries
8 entries across 8 versions & 1 rubygems