Skip to content

Instantly share code, notes, and snippets.

View amitaibu's full-sized avatar

Amitai Burstein amitaibu

View GitHub Profile
# Patches Jekyll's built-in pagination to work with files *other* than the base index.html.
# Expects the following to be specified in your _config.yml:
#
# paginate_base: "blog" # Puts all pagination folders in the "blog" dir, e.g. "/blog/page2"
# paginate_index: "blog/index.html" # Paginates using the specified file
module Jekyll
class Page
@bennylope
bennylope / pagination.rb
Created October 18, 2011 00:33
Jekyll pagination, pageN pages into /blog/ directory
module Jekyll
class Pagination < Generator
# This generator is safe from arbitrary code execution.
safe true
# Generate paginated pages if necessary.
#
# site - The Site.
#