Class Jekyll::Post
In: lib/jekyll/post.rb
Parent: Object

Methods

<=>   categories   dir   id   inspect   new   next   permalink   previous   process   related_posts   render   template   to_liquid   url   valid?   write  

Included Modules

Comparable Convertible

Constants

MATCHER = /^(.+\/)*(\d+-\d+-\d+)-(.*)(\.[^.]+)$/

Attributes

categories  [W] 
content  [RW] 
data  [RW] 
date  [RW] 
ext  [RW] 
lsi  [RW] 
output  [RW] 
published  [RW] 
site  [RW] 
slug  [RW] 
tags  [RW] 

Public Class methods

Initialize this Post instance.

  +site+ is the Site
  +base+ is the String path to the dir containing the post file
  +name+ is the String filename of the post file
  +categories+ is an Array of Strings for the categories for this post

Returns <Post>

Post name validator. Post filenames must be like:

  2008-11-05-my-awesome-post.textile

Returns <Bool>

Public Instance methods

Spaceship is based on Post#date, slug

Returns -1, 0, 1

The generated directory into which the post will be placed upon generation. This is derived from the permalink or, if permalink is absent, set to the default date e.g. "/2008/11/05/" if the permalink style is :date, otherwise nothing

Returns <String>

The UID for this post (useful in feeds) e.g. /2008/11/05/my-awesome-post

Returns <String>

The full path and filename of the post. Defined in the YAML of the post body (Optional)

Returns <String>

Extract information from the post filename

  +name+ is the String filename of the post file

Returns nothing

Calculate related posts.

Returns [<Post>]

Add any necessary layouts to this post

  +layouts+ is a Hash of {"name" => "layout"}
  +site_payload+ is the site payload hash

Returns nothing

Convert this post into a Hash for use in Liquid templates.

Returns <Hash>

The generated relative url of this post e.g. /2008/11/05/my-awesome-post.html

Returns <String>

Write the generated post file to the destination directory.

  +dest+ is the String path to the destination dir

Returns nothing

[Validate]