Skip to content

Conversation

@shivabhusal
Copy link

Enable pagination for multiple pages

If you have a need to have pagination in multiple pages like:

You have a blog page where you are trying to display a paginated list of blog-posts. And, underneath every post title
you would like to show article-excerpt(summary from first paragraph normally). You also felt that this could be more
verbose so you though to have a more slimmer version of post-list; where there will be only post-title and
published/updated date.

In short you want to have two versions/templates for pagination. This is how you can achieve:-

  # in _config.yml
  
  paginate:         2 # default for all below; will be overridden by `per_page` value
  pagination: 
    - paginate:
        path:       /blog/page:num/
        per_page:   2
    - paginate:
        path:       /slim/page:num/
        per_page:   1

@shivabhusal
Copy link
Author

shivabhusal commented Jul 6, 2017

CI error

An error occurred while installing public_suffix (2.0.5), and Bundler cannot
continue.
Make sure that `gem install public_suffix -v '2.0.5'` succeeds before bundling.
The command "eval bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle} " failed 3 times.
The command "bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}" failed and exited with 5 during .

Note:
Only tests related to Ruby 1.9.3 is failing because of public_suffix (2.0.5) gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant