jekyll-paginate-1.1.0/0000755000175000017500000000000012440273473014433 5ustar uwabamiuwabamijekyll-paginate-1.1.0/.rspec0000644000175000017500000000003212440273473015543 0ustar uwabamiuwabami--color --format progress jekyll-paginate-1.1.0/jekyll-paginate.gemspec0000644000175000017500000000167612440273473021072 0ustar uwabamiuwabami# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'jekyll-paginate/version' Gem::Specification.new do |spec| spec.name = "jekyll-paginate" spec.version = Jekyll::Paginate::VERSION spec.authors = ["Parker Moore"] spec.email = ["parkrmoore@gmail.com"] spec.summary = %q{Built-in Pagination Generator for Jekyll} spec.homepage = "https://github.com/jekyll/jekyll-paginate" spec.license = "MIT" spec.files = `git ls-files -z`.split("\x0") spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] spec.add_development_dependency "jekyll", "~> 2.0" spec.add_development_dependency "bundler", "~> 1.5" spec.add_development_dependency "rake" spec.add_development_dependency "rspec", "~> 3.0" end jekyll-paginate-1.1.0/script/0000755000175000017500000000000012440273473015737 5ustar uwabamiuwabamijekyll-paginate-1.1.0/script/bootstrap0000755000175000017500000000003412440273473017677 0ustar uwabamiuwabami#!/bin/bash bundle install jekyll-paginate-1.1.0/script/cibuild0000755000175000017500000000003712440273473017300 0ustar uwabamiuwabami#!/bin/bash bundle exec rspec jekyll-paginate-1.1.0/script/unbundle0000755000175000017500000000042312440273473017500 0ustar uwabamiuwabami#!/bin/bash RELEASES_URL="https://github.com/jekyll/jekyll/releases" JEKYLL_VERSION=`curl http://jekyllrb.com/latest_version.txt` JEKYLL_BUNDLE="jekyll-${JEKYLL_VERSION}.tar.gz" wget "${RELEASES_URL}/download/v${JEKYLL_VERSION}/${JEKYLL_BUNDLE}" tar -xzvf ${JEKYLL_BUNDLE} jekyll-paginate-1.1.0/.gitignore0000644000175000017500000000021212440273473016416 0ustar uwabamiuwabami*.gem *.rbc .bundle .config .yardoc Gemfile.lock InstalledFiles _yardoc coverage doc/ lib/bundler/man pkg rdoc spec/reports spec/dest tmp jekyll-paginate-1.1.0/History.markdown0000644000175000017500000000025312440273473017640 0ustar uwabamiuwabami## 1.1.0 / 2014-10-14 ### Minor Enhancements * Filter out posts that have `hidden: true` in front matter (#13) ### Development Fixes * Fix tests for rspec 3. (#9) jekyll-paginate-1.1.0/LICENSE.txt0000644000175000017500000000205512440273473016260 0ustar uwabamiuwabamiCopyright (c) 2014 Parker Moore MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jekyll-paginate-1.1.0/lib/0000755000175000017500000000000012440273473015201 5ustar uwabamiuwabamijekyll-paginate-1.1.0/lib/jekyll-paginate/0000755000175000017500000000000012440273473020261 5ustar uwabamiuwabamijekyll-paginate-1.1.0/lib/jekyll-paginate/pagination.rb0000644000175000017500000000543412440273473022745 0ustar uwabamiuwabamimodule Jekyll module Paginate class Pagination < Generator # This generator is safe from arbitrary code execution. safe true # This generator should be passive with regard to its execution priority :lowest # Generate paginated pages if necessary. # # site - The Site. # # Returns nothing. def generate(site) if Pager.pagination_enabled?(site) if template = template_page(site) paginate(site, template) else Jekyll.logger.warn "Pagination:", "Pagination is enabled, but I couldn't find " + "an index.html page to use as the pagination template. Skipping pagination." end end end # Paginates the blog's posts. Renders the index.html file into paginated # directories, e.g.: page2/index.html, page3/index.html, etc and adds more # site-wide data. # # site - The Site. # page - The index.html Page that requires pagination. # # {"paginator" => { "page" => , # "per_page" => , # "posts" => [], # "total_posts" => , # "total_pages" => , # "previous_page" => , # "next_page" => }} def paginate(site, page) all_posts = site.site_payload['site']['posts'] all_posts = all_posts.reject { |p| p['hidden'] } pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i) (1..pages).each do |num_page| pager = Pager.new(site, num_page, all_posts, pages) if num_page > 1 newpage = Page.new(site, site.source, page.dir, page.name) newpage.pager = pager newpage.dir = Pager.paginate_path(site, num_page) site.pages << newpage else page.pager = pager end end end # Static: Fetch the URL of the template page. Used to determine the # path to the first pager in the series. # # site - the Jekyll::Site object # # Returns the url of the template page def self.first_page_url(site) if page = Pagination.new.template_page(site) page.url else nil end end # Public: Find the Jekyll::Page which will act as the pager template # # site - the Jekyll::Site object # # Returns the Jekyll::Page which will act as the pager template def template_page(site) site.pages.dup.select do |page| Pager.pagination_candidate?(site.config, page) end.sort do |one, two| two.path.size <=> one.path.size end.first end end end end jekyll-paginate-1.1.0/lib/jekyll-paginate/pager.rb0000644000175000017500000001200512440273473021702 0ustar uwabamiuwabamimodule Jekyll module Paginate class Pager attr_reader :page, :per_page, :posts, :total_posts, :total_pages, :previous_page, :previous_page_path, :next_page, :next_page_path # 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. def self.calculate_pages(all_posts, per_page) (all_posts.size.to_f / per_page.to_i).ceil end # Determine if pagination is enabled the site. # # site - the Jekyll::Site object # # Returns true if pagination is enabled, false otherwise. def self.pagination_enabled?(site) !site.config['paginate'].nil? && site.pages.size > 0 end # 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 def self.pagination_candidate?(config, page) page_dir = File.dirname(File.expand_path(remove_leading_slash(page.path), config['source'])) paginate_path = remove_leading_slash(config['paginate_path']) paginate_path = File.expand_path(paginate_path, config['source']) page.name == 'index.html' && in_hierarchy(config['source'], page_dir, File.dirname(paginate_path)) end # 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 def self.in_hierarchy(source, page_dir, paginate_path) return false if paginate_path == File.dirname(paginate_path) return false if paginate_path == Pathname.new(source).parent page_dir == paginate_path || in_hierarchy(source, page_dir, File.dirname(paginate_path)) end # 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 def self.paginate_path(site, num_page) return nil if num_page.nil? return Pagination.first_page_url(site) if num_page <= 1 format = site.config['paginate_path'] format = format.sub(':num', num_page.to_s) ensure_leading_slash(format) end # 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 def self.ensure_leading_slash(path) path[0..0] == "/" ? path : "/#{path}" end # Static: Return a String version of the input without a leading slash. # # path - a String path # # Returns the input without the leading slash def self.remove_leading_slash(path) ensure_leading_slash(path)[1..-1] end # 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. def initialize(site, page, all_posts, num_pages = nil) @page = page @per_page = site.config['paginate'].to_i @total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page) if @page > @total_pages raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}" end init = (@page - 1) * @per_page offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1) @total_posts = all_posts.size @posts = all_posts[init..offset] @previous_page = @page != 1 ? @page - 1 : nil @previous_page_path = Pager.paginate_path(site, @previous_page) @next_page = @page != @total_pages ? @page + 1 : nil @next_page_path = Pager.paginate_path(site, @next_page) end # Convert this Pager's data to a Hash suitable for use by Liquid. # # Returns the Hash representation of this Pager. def to_liquid { 'page' => page, 'per_page' => per_page, 'posts' => posts, 'total_posts' => total_posts, 'total_pages' => total_pages, 'previous_page' => previous_page, 'previous_page_path' => previous_page_path, 'next_page' => next_page, 'next_page_path' => next_page_path } end end end end jekyll-paginate-1.1.0/lib/jekyll-paginate/version.rb0000644000175000017500000000010012440273473022262 0ustar uwabamiuwabamimodule Jekyll module Paginate VERSION = "1.1.0" end end jekyll-paginate-1.1.0/lib/jekyll-paginate.rb0000644000175000017500000000022212440273473020602 0ustar uwabamiuwabamirequire "jekyll-paginate/version" require "jekyll-paginate/pager" require "jekyll-paginate/pagination" module Jekyll module Paginate end end jekyll-paginate-1.1.0/.travis.yml0000644000175000017500000000064712440273473016553 0ustar uwabamiuwabamilanguage: ruby cache: bundler before_install: script/unbundle install: - travis_retry bundle install --path vendor/bundle rvm: - 2.1 - 2.0 - 1.9.3 script: script/cibuild notifications: irc: on_success: change on_failure: change channels: - irc.freenode.org#jekyll template: - '%{repository}#%{build_number} (%{branch}) %{message} %{build_url}' email: on_success: never on_failure: never jekyll-paginate-1.1.0/metadata.yml0000644000175000017500000000657412440273473016752 0ustar uwabamiuwabami--- !ruby/object:Gem::Specification name: jekyll-paginate version: !ruby/object:Gem::Version version: 1.1.0 platform: ruby authors: - Parker Moore autorequire: bindir: bin cert_chain: [] date: 2014-10-14 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: jekyll requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '2.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '2.0' - !ruby/object:Gem::Dependency name: bundler requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '1.5' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '1.5' - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: rspec requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.0' description: email: - parkrmoore@gmail.com executables: [] extensions: [] extra_rdoc_files: [] files: - ".gitignore" - ".rspec" - ".travis.yml" - Gemfile - History.markdown - LICENSE.txt - README.md - Rakefile - jekyll-paginate.gemspec - lib/jekyll-paginate.rb - lib/jekyll-paginate/pager.rb - lib/jekyll-paginate/pagination.rb - lib/jekyll-paginate/version.rb - script/bootstrap - script/cibuild - script/unbundle - spec/pager_spec.rb - spec/pagination_spec.rb - spec/source/_posts/2014-05-20-blah.html - spec/source/_posts/2014-05-21-bleh.html - spec/source/_posts/2014-05-22-humor.html - spec/source/_posts/2014-05-23-hey-there.html - spec/source/_posts/2014-05-24-whateva.html - spec/source/_posts/2014-05-25-oh-yes.html - spec/source/contacts/index.html - spec/source/index.html - spec/spec_helper.rb homepage: https://github.com/jekyll/jekyll-paginate licenses: - MIT metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.2.2 signing_key: specification_version: 4 summary: Built-in Pagination Generator for Jekyll test_files: - spec/pager_spec.rb - spec/pagination_spec.rb - spec/source/_posts/2014-05-20-blah.html - spec/source/_posts/2014-05-21-bleh.html - spec/source/_posts/2014-05-22-humor.html - spec/source/_posts/2014-05-23-hey-there.html - spec/source/_posts/2014-05-24-whateva.html - spec/source/_posts/2014-05-25-oh-yes.html - spec/source/contacts/index.html - spec/source/index.html - spec/spec_helper.rb jekyll-paginate-1.1.0/Rakefile0000644000175000017500000000003412440273473016075 0ustar uwabamiuwabamirequire "bundler/gem_tasks" jekyll-paginate-1.1.0/spec/0000755000175000017500000000000012440273473015365 5ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/spec_helper.rb0000644000175000017500000000651212440273473020207 0ustar uwabamiuwabamirequire 'jekyll' require File.expand_path("../lib/jekyll-paginate", File.dirname(__FILE__)) module TestMethods def test_dir(*subdirs) File.join(File.dirname(__FILE__), *subdirs) end def dest_dir(*subdirs) test_dir('dest', *subdirs) end def source_dir(*subdirs) test_dir('source', *subdirs) end def build_configs(overrides, base_hash = Jekyll::Configuration::DEFAULTS) Jekyll::Utils.deep_merge_hashes(base_hash, overrides) end def site_configuration(overrides = {}) build_configs({ "source" => source_dir, "destination" => dest_dir }, build_configs(overrides)) end def build_site(config = {}) site = Jekyll::Site.new(site_configuration( {"paginate" => 1}.merge(config) )) site.process site end end RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end # rspec-mocks config goes here. You can use an alternate test double # library (such as bogus or mocha) by changing the `mock_with` option here. config.mock_with :rspec do |mocks| # Prevents you from mocking or stubbing a method that does not exist on # a real object. This is generally recommended, and will default to # `true` in RSpec 4. mocks.verify_partial_doubles = true end # These two settings work together to allow you to limit a spec run # to individual examples or groups you care about by tagging them with # `:focus` metadata. When nothing is tagged with `:focus`, all examples # get run. config.filter_run :focus config.run_all_when_everything_filtered = true # Limits the available syntax to the non-monkey patched syntax that is recommended. # For more details, see: # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching config.disable_monkey_patching! # This setting enables warnings. It's recommended, but in some cases may # be too noisy due to issues in dependencies. # config.warnings = true # Many RSpec users commonly either run the entire suite or an individual # file, and it's useful to allow more verbose output when running an # individual spec file. if config.files_to_run.one? # Use the documentation formatter for detailed output, # unless a formatter has already been configured # (e.g. via a command-line flag). config.default_formatter = 'doc' end # Print the 10 slowest examples and example groups at the # end of the spec run, to help surface which specs are running # particularly slow. config.profile_examples = 10 # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run. # --seed 1234 config.order = :random # Seed global randomization in this process using the `--seed` CLI option. # Setting this allows you to use `--seed` to deterministically reproduce # test failures related to randomization by passing the same `--seed` value # as the one that triggered the failure. Kernel.srand config.seed include TestMethods end jekyll-paginate-1.1.0/spec/pagination_spec.rb0000644000175000017500000000000012440273473021043 0ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/0000755000175000017500000000000012440273473016665 5ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/contacts/0000755000175000017500000000000012440273473020503 5ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/contacts/index.html0000644000175000017500000000000712440273473022475 0ustar uwabamiuwabami--- ---jekyll-paginate-1.1.0/spec/source/_posts/0000755000175000017500000000000012440273473020174 5ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/_posts/2014-05-25-oh-yes.html0000644000175000017500000000000012440273473023306 0ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/_posts/2014-05-20-blah.html0000644000175000017500000000000012440273473023003 0ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/_posts/2014-05-22-humor.html0000644000175000017500000000000012440273473023231 0ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/_posts/2014-05-24-whateva.html0000644000175000017500000000000012440273473023540 0ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/_posts/2014-05-21-bleh.html0000644000175000017500000000000012440273473023010 0ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/_posts/2014-05-23-hey-there.html0000644000175000017500000000000012440273473023772 0ustar uwabamiuwabamijekyll-paginate-1.1.0/spec/source/index.html0000644000175000017500000000000712440273473020657 0ustar uwabamiuwabami--- ---jekyll-paginate-1.1.0/spec/pager_spec.rb0000644000175000017500000001107212440273473020023 0ustar uwabamiuwabamirequire 'spec_helper' RSpec.describe(Jekyll::Paginate::Pager) do it "calculate number of pages" do expect(described_class.calculate_pages([], '2')).to eql(0) expect(described_class.calculate_pages([1], '2')).to eql(1) expect(described_class.calculate_pages([1,2], '2')).to eql(1) expect(described_class.calculate_pages([1,2,3], '2')).to eql(2) expect(described_class.calculate_pages([1,2,3,4], '2')).to eql(2) expect(described_class.calculate_pages([1,2,3,4,5], '2')).to eql(3) end context "with the default paginate_path" do let(:site) { build_site } it "determines the correct pagination path for each page" do expect(described_class.paginate_path(site, 1)).to eql("/index.html") expect(described_class.paginate_path(site, 2)).to eql("/page2") end end context "with paginate_path set to a subdirectory with no index.html" do let(:site) { build_site({'paginate_path' => '/blog/page-:num'}) } it "determines the correct pagination path for each page" do expect(described_class.paginate_path(site, 1)).to eql("/index.html") expect(described_class.paginate_path(site, 2)).to eql("/blog/page-2") end end context "with paginate_path set to a subdirectory with no index.html with num pages being in subdirectories" do let(:site) { build_site({'paginate_path' => '/blog/page/:num'}) } it "determines the correct pagination path for each page" do expect(described_class.paginate_path(site, 1)).to eql("/index.html") expect(described_class.paginate_path(site, 2)).to eql("/blog/page/2") end end context "with paginate_path set to a subdirectory wherein an index.html exists" do let(:site) { build_site({'paginate_path' => '/contacts/page:num'}) } it "determines the correct pagination path for each page" do expect(described_class.paginate_path(site, 1)).to eql("/contacts/index.html") expect(described_class.paginate_path(site, 2)).to eql("/contacts/page2") end end context "with paginate_path set to a subdir wherein an index.html exists with pages in subdirs" do let(:site) { build_site({'paginate_path' => '/contacts/page/:num'}) } it "determines the correct pagination path for each page" do expect(described_class.paginate_path(site, 1)).to eql("/contacts/index.html") expect(described_class.paginate_path(site, 2)).to eql("/contacts/page/2") end end context "pagination disabled" do let(:site) { build_site('paginate' => nil) } it "report that pagination is disabled" do expect(described_class.pagination_enabled?(site)).to be_falsey end end context "pagination enabled for 2" do let(:site) { build_site('paginate' => 2) } let(:posts) { site.posts } it "report that pagination is enabled" do expect(described_class.pagination_enabled?(site)).to be_truthy end context "with 4 posts" do let(:posts) { site.posts[1..4] } it "create first pager" do pager = described_class.new(site, 1, posts) expect(pager.posts.size).to eql(2) expect(pager.total_pages).to eql(2) expect(pager.previous_page).to be_nil expect(pager.next_page).to eql(2) end it "create second pager" do pager = described_class.new(site, 2, posts) expect(pager.posts.size).to eql(2) expect(pager.total_pages).to eql(2) expect(pager.previous_page).to eql(1) expect(pager.next_page).to be_nil end it "not create third pager" do expect { described_class.new(site, 3, posts) }.to raise_error end end context "with 5 posts" do let(:posts) { site.posts[1..5] } it "create first pager" do pager = described_class.new(site, 1, posts) expect(pager.posts.size).to eql(2) expect(pager.total_pages).to eql(3) expect(pager.previous_page).to be_nil expect(pager.next_page).to eql(2) end it "create second pager" do pager = described_class.new(site, 2, posts) expect(pager.posts.size).to eql(2) expect(pager.total_pages).to eql(3) expect(pager.previous_page).to eql(1) expect(pager.next_page).to eql(3) end it "create third pager" do pager = described_class.new(site, 3, posts) expect(pager.posts.size).to eql(1) expect(pager.total_pages).to eql(3) expect(pager.previous_page).to eql(2) expect(pager.next_page).to be_nil end it "not create fourth pager" do expect { described_class.new(site, 4, posts) }.to raise_error(RuntimeError) end end end end jekyll-paginate-1.1.0/Gemfile0000644000175000017500000000014412440273473015725 0ustar uwabamiuwabamisource 'https://rubygems.org' # Specify your gem's dependencies in jekyll-paginate.gemspec gemspec jekyll-paginate-1.1.0/README.md0000644000175000017500000000142712440273473015716 0ustar uwabamiuwabami# Jekyll::Paginate Default pagination generator for Jekyll. [![Build Status](https://secure.travis-ci.org/jekyll/jekyll-paginate.svg?branch=master)](https://travis-ci.org/jekyll/jekyll-paginate) ## Installation Add this line to your application's Gemfile: gem 'jekyll-paginate' And then execute: $ bundle Or install it yourself as: $ gem install jekyll-paginate ## Usage Once the gem is installed on your system, Jekyll will auto-require it. Just set the following configuration ## Contributing 1. Fork it ( http://github.com/jekyll/jekyll-paginate/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request