Class Jekyll::Pager
In: lib/jekyll/generators/pagination.rb
Parent: Object

Methods

Attributes

next_page  [R] 
page  [R] 
per_page  [R] 
posts  [R] 
previous_page  [R] 
total_pages  [R] 
total_posts  [R] 

Public Class methods

Calculate the number of pages.

all_posts - The Array of all Posts. per_page - The Integer of entries per page.

Returns the Integer number of pages.

Initialize a new Pager.

config - The Hash configuration of the site. page - The Integer page number. all_posts - The Array of all the site‘s Posts. num_pages - The Integer number of pages or nil if you‘d like the number

            of pages calculated.

Determine if pagination is enabled for a given file.

config - The configuration Hash. file - The String filename of the file.

Returns true if pagination is enabled, false otherwise.

Public Instance methods

Convert this Pager‘s data to a Hash suitable for use by Liquid.

Returns the Hash representation of this Pager.

[Validate]