Class Jekyll::Site
In: lib/jekyll/site.rb
Parent: Object

Methods

Attributes

categories  [RW] 
config  [RW] 
converters  [RW] 
dest  [RW] 
exclude  [RW] 
future  [RW] 
generators  [RW] 
layouts  [RW] 
limit_posts  [RW] 
lsi  [RW] 
pages  [RW] 
permalink_style  [RW] 
plugins  [RW] 
posts  [RW] 
pygments  [RW] 
safe  [RW] 
source  [RW] 
static_files  [RW] 
tags  [RW] 
time  [RW] 

Public Class methods

Public: Initialize a new Site.

config - A Hash containing site configuration details.

Public Instance methods

Remove orphaned files and empty directories in destination.

Returns nothing.

Filter out any files/directories that are hidden or backup files (start with "." or "#" or end with "~"), or contain site content (start with "_"), or are excluded in the site configuration, unless they are web server files such as ’.htaccess’.

entries - The Array of file/directory entries to filter.

Returns the Array of filtered entries.

Run each of the Generators.

Returns nothing.

Get the implementation class for the given Converter.

klass - The Class of the Converter to fetch.

Returns the Converter instance implementing the given Converter.

Constructs a Hash of Posts indexed by the specified Post attribute.

post_attr - The String name of the Post attribute.

Examples

  post_attr_hash('categories')
  # => { 'tech' => [<Post A>, <Post B>],
  #      'ruby' => [<Post B>] }

Returns the Hash: { attr => posts } where

  attr  - One of the values for the requested attribute.
  posts - The Array of Posts with the given attr value.

Public: Read, process, and write this Site to output.

Returns nothing.

Read Site data from disk and load it into internal data structures.

Returns nothing.

Recursively traverse directories to find posts, pages and static files that will become part of the site according to the rules in filter_entries.

dir - The String relative path of the directory to read.

Returns nothing.

Read all the files in <source>/<dir>/_layouts and create a new Layout object with each one.

Returns nothing.

Read all the files in <source>/<dir>/_posts and create a new Post object with each one.

dir - The String relative path of the directory to read.

Returns nothing.

Render the site to the destination.

Returns nothing.

Reset Site details.

Returns nothing

Load necessary libraries, plugins, converters, and generators.

Returns nothing.

The Hash payload containing site-wide data.

Returns the Hash: { "site" => data } where data is a Hash with keys:

  "time"       - The Time as specified in the configuration or the
                 current time if none was specified.
  "posts"      - The Array of Posts, sorted chronologically by post date
                 and then title.
  "pages"      - The Array of all Pages.
  "html_pages" - The Array of HTML Pages.
  "categories" - The Hash of category values and Posts.
                 See Site#post_attr_hash for type info.
  "tags"       - The Hash of tag values and Posts.
                 See Site#post_attr_hash for type info.

Write static files, pages, and posts.

Returns nothing.

[Validate]