Class: Jekyll::Layout

### Home Classes Methods

### In Files

- lib/jekyll/layout.rb

### Parent

Object

### Methods

- ::new
- #process

### Included Modules

- Jekyll::Convertible

### Files

- LICENSE

### Class/Module Index

Quicksearch

- Jekyll
- Jekyll::Command
- Jekyll::Commands
- Jekyll::Commands::Build
- Jekyll::Commands::Doctor
- Jekyll::Commands::New
- Jekyll::Commands::Serve
- Jekyll::Configuration
- Jekyll::Converter
- Jekyll::Converters
- Jekyll::Converters::Identity
- Jekyll::Converters::Markdown
- Jekyll::Converters::Markdown::KramdownParser
- Jekyll::Converters::Markdown::MarukuParser
- Jekyll::Converters::Markdown::RDiscountParser
- Jekyll::Converters::Markdown::RedcarpetParser
- Jekyll::Converters::Markdown::RedcarpetParser::CommonMethods
- Jekyll::Converters::Markdown::RedcarpetParser::WithPygments
- Jekyll::Converters::Markdown::RedcarpetParser::WithoutPygments
- Jekyll::Converters::Textile
- Jekyll::Convertible
- Jekyll::Deprecator
- Jekyll::Draft
- Jekyll::Excerpt
- Jekyll::FatalException
- Jekyll::Filters
- Jekyll::Generator
- Jekyll::Generators
- Jekyll::Generators::Pagination
- Jekyll::GistTag
- Jekyll::Layout
- Jekyll::Page
- Jekyll::Pager
- Jekyll::Plugin
- Jekyll::Post
- Jekyll::RelatedPosts
- Jekyll::Site
- Jekyll::Site::Cleaner
- Jekyll::StaticFile
- Jekyll::Stevenson
- Jekyll::Tags
- Jekyll::Tags::HighlightBlock
- Jekyll::Tags::IncludeTag
- Jekyll::Tags::PostComparer
- Jekyll::Tags::PostUrl
- Jekyll::URL
- Date
- Enumerable
- Hash
- Object

No matching classes.

# Jekyll::Layout

### Attributes

content[RW]

Gets/Sets the content of this layout.

data[RW]

Gets/Sets the Hash that holds the metadata for this layout.

ext[RW]

Gets/Sets the extension of this layout.

name[R]

Gets the name of this layout.

site[R]

Gets the Site object.

### Public Class Methods

new(site, base, name) click to toggle source

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 25
    def initialize(site, base, name)
      @site = site
      @base = base
      @name = name

      self.data = {}

      self.process(name)
      self.read_yaml(base, name)
    end

### Public Instance Methods

process(name) click to toggle source

Extract information from the layout filename.

name - The String filename of the layout file.

Returns nothing.

    # File lib/jekyll/layout.rb, line 41
    def process(name)
      self.ext = File.extname(name)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.