Sha256: ad16aa9ea0ac2788bccaf3741993f793bc5f50a0f85da78e350ec0740bb2fcb5

Contents?: true

Size: 723 Bytes

Versions: 44

Compression:

Stored size: 723 Bytes

Contents

module Jekyll
  class PagedFeedPage < Page
    def initialize(site, base, dir, name, page_number, pages_total, format)
      @site = site
      @dir = "/"
      @name = name

      self.process(@name)
      self.read_yaml(File.join(base, '_layouts'), 'feed.xml')
      self.data['next'] = pages_total > page_number ? (page_number + 1).to_s : nil
      self.data['last'] = pages_total > 1 ? pages_total.to_s : nil
      self.data['prev'] = case page_number
        when 1 then nil
        when 2 then ""
        else        (page_number - 1).to_s
      end
      self.data['myself'] = page_number == 1 ? nil : page_number.to_s
      self.data['format'] = format
      self.data['page_number'] = page_number
    end
  end
end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
jekyll-octopod-0.7.3 lib/jekyll/paged_feed_page.rb
jekyll-octopod-0.7.2 lib/jekyll/paged_feed_page.rb
jekyll-octopod-0.7.1 lib/jekyll/paged_feed_page.rb
jekyll-octopod-0.7.0 lib/jekyll/paged_feed_page.rb