Class Jekyll::Paginate::Pager
In: lib/jekyll-paginate/pager.rb
Parent: Object

Methods

Attributes

next_page  [R] 
next_page_path  [R] 
page  [R] 
per_page  [R] 
posts  [R] 
previous_page  [R] 
previous_page_path  [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.

Static: Return a String version of the input which has a leading slash.

        If the input already has a forward slash in position zero, it will be
        returned unchanged.

path - a String path

Returns the path with a leading slash

Determine if the subdirectories of the two paths are the same relative to source

source - the site source page_dir - the directory of the Jekyll::Page paginate_path - the absolute paginate path (from root of FS)

Returns whether the subdirectories are the same relative to source

Initialize a new Pager.

site - the Jekyll::Site object 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.

Static: Return the pagination path of the page

site - the Jekyll::Site object num_page - the pagination page number

Returns the pagination path as a string

Static: Determine if a page is a possible candidate to be a template page.

        Page's name must be `index.html` and exist in any of the directories
        between the site source and `paginate_path`.

config - the site configuration hash page - the Jekyll::Page about which we‘re inquiring

Returns true if the

Determine if pagination is enabled the site.

site - the Jekyll::Site object

Returns true if pagination is enabled, false otherwise.

Static: Return a String version of the input without a leading slash.

path - a String path

Returns the input without the leading slash

Public Instance methods

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

Returns the Hash representation of this Pager.

[Validate]